Skip to content

Instantly share code, notes, and snippets.

@sharifulin
Created April 20, 2011 13:52
Show Gist options
  • Save sharifulin/931383 to your computer and use it in GitHub Desktop.
Save sharifulin/931383 to your computer and use it in GitHub Desktop.
Multipart params bug or not
use Mojolicious::Lite;
post '/' => sub {
my $self = shift;
my @test = $self->req->param('test');
return $self->render_text(join "\n", @test);
};
use Test::Mojo;
use Test::More tests => 9;
my $t = Test::Mojo->new;
$t->post_form_ok('/', , {
test => [1..5],
})
->status_is(200)
->content_is(join "\n", 1..5)
;
# error
$t->post_form_ok('/', , {
test => [1..5],
metafile => { file => $0 },
})
->status_is(200)
->content_is(join "\n", 1..5)
;
# ok, why?
$t->post_form_ok('/', , {
test => [1..5],
metafile => { file => $0 },
})
->status_is(200)
->content_is(join ",", 1..5)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment