Skip to content

Commit

Permalink
test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 9, 2013
1 parent ae43ebb commit d7e5ae2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

3.76 2013-01-09
3.76 2013-01-10
- Added support for multiple uploads sharing the same name to
Mojo::UserAgent::Transactor.
- Improved performance and memory usage of Mojo::EventEmitter.
Expand Down
7 changes: 3 additions & 4 deletions t/mojo/transactor.t
Expand Up @@ -162,7 +162,6 @@ like $tx->req->content->parts->[0]->headers->content_disposition,
like $tx->req->content->parts->[0]->asset->slurp, qr/mytext/, 'right part';
ok !$tx->req->content->parts->[0]->headers->header('file'), 'no "file" header';
is $tx->req->content->parts->[0]->headers->dnt, 1, 'right "DNT" header';
ok !$tx->req->content->parts->[0]->headers->header('file'), 'no leaked header';
is $tx->req->content->parts->[1], undef, 'no more parts';

# Multipart form with in-memory content
Expand All @@ -174,7 +173,7 @@ is $tx->req->headers->content_type, 'multipart/form-data',
like $tx->req->content->parts->[0]->headers->content_disposition, qr/mytext/,
'right "Content-Disposition" value';
ok !$tx->req->content->parts->[0]->headers->header('content'),
'no leaked header';
'no "content" header';
is $tx->req->content->parts->[0]->asset->slurp, 'lalala', 'right part';
is $tx->req->content->parts->[1], undef, 'no more parts';

Expand All @@ -187,9 +186,9 @@ is $tx->req->headers->content_type, 'multipart/form-data',
'right "Content-Type" value';
like $tx->req->content->parts->[0]->headers->content_disposition,
qr/foo\.zip/, 'right "Content-Disposition" value';
is $tx->req->content->parts->[0]->asset->slurp, 'whatever', 'right part';
ok !$tx->req->content->parts->[0]->headers->header('filename'),
'no leaked header';
'no "filename" header';
is $tx->req->content->parts->[0]->asset->slurp, 'whatever', 'right part';
is $tx->req->content->parts->[1], undef, 'no more parts';
is $tx->req->upload('myzip')->filename, 'foo.zip', 'right filename';
is $tx->req->upload('myzip')->size, 8, 'right size';
Expand Down

0 comments on commit d7e5ae2

Please sign in to comment.