X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Flive_engine_response_cookies.t;fp=t%2Faggregate%2Flive_engine_response_cookies.t;h=add2cddf72cb231610e4ea46d10b3471e2be4469;hb=db9407301b748638a6f3b72d459bf7cc74162468;hp=5f2f2266c6605e7e2a428a5ad461af31615dd61e;hpb=38a55e0cf0b70133b1a8369c04e3bc0ee444c4b7;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/live_engine_response_cookies.t b/t/aggregate/live_engine_response_cookies.t index 5f2f226..add2cdd 100644 --- a/t/aggregate/live_engine_response_cookies.t +++ b/t/aggregate/live_engine_response_cookies.t @@ -71,3 +71,24 @@ my $expected = { this_is_the_real_name => [ qw(this_is_the_real_name foo&bar path /) ], # not "object" }, 'Response Cookies' ); } + +{ + my $response; + ok( $response = request('http://localhost/engine/response/cookies/four'), + 'Request' ); + ok( $response->is_success, 'Response Successful 2xx' ) or diag explain $response; + is( $response->content_type, 'text/plain', 'Response Content-Type' ); + is( $response->header('X-Catalyst-Action'), + 'engine/response/cookies/four', 'Test Action' ); + + my $cookies = {}; + + for my $string ( $response->header('Set-Cookie') ) { + my $cookie = [ split_header_words $string]; + $cookies->{ $cookie->[0]->[0] } = $cookie->[0]; + } + + is_deeply( $cookies, { + good => [qw|good good_cookie path /|], + }, 'Response Cookies' ); +}