Created
April 20, 2011 13:52
-
-
Save sharifulin/931383 to your computer and use it in GitHub Desktop.
Multipart params bug or not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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