Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
a few more cookie jar tests
  • Loading branch information
kraih committed Feb 13, 2018
1 parent 22abdf9 commit c9e76b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions t/mojo/cookiejar.t
Expand Up @@ -254,6 +254,10 @@ $tx->req->url->parse('http://mojolicious.org/perldoc');
$jar->prepare($tx);
is $tx->req->cookie('foo')->name, 'foo', 'right name';
is $tx->req->cookie('foo')->value, 'without', 'right value';
is $jar->all->[0]->name, 'foo', 'right name';
is $jar->all->[0]->value, 'without', 'right value';
is $jar->all->[0]->domain, 'mojolicious.org', 'right domain';
is $jar->all->[1], undef, 'no second cookie';
$tx = Mojo::Transaction::HTTP->new;
$tx->req->url->parse('http://www.mojolicious.org/perldoc');
$jar->prepare($tx);
Expand Down Expand Up @@ -284,8 +288,8 @@ $tx = Mojo::Transaction::HTTP->new;
$tx->req->url->parse('http://example.com/test');
$jar->prepare($tx);
$cookies = $tx->req->every_cookie('foo');
is $cookies->[0]->name, 'foo', 'right name';
is $cookies->[0]->value, 'with', 'right value';
is $cookies->[0]->name, 'foo', 'right name';
is $cookies->[0]->value, 'with', 'right value';
is $cookies->[1], undef, 'no second cookie';
$tx = Mojo::Transaction::HTTP->new;
$tx->req->url->parse('http://www.example.com/test');
Expand Down

0 comments on commit c9e76b8

Please sign in to comment.