X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flive%2Fengine%2Fresponse%2Fcookies.t;fp=t%2Flive%2Fengine%2Fresponse%2Fcookies.t;h=0ed7e91c9aecc18bdc575fa3d0e83f5fafeb9c88;hb=b39840dab69d787e608212d070f7ab4a29204f5f;hp=410e35162a96b2d4813b85ec72824d5de77c1722;hpb=8dc75d2656767ebfd5e47a2f1752cbfb58619df9;p=catagits%2FCatalyst-Runtime.git diff --git a/t/live/engine/response/cookies.t b/t/live/engine/response/cookies.t index 410e351..0ed7e91 100644 --- a/t/live/engine/response/cookies.t +++ b/t/live/engine/response/cookies.t @@ -8,12 +8,11 @@ use lib "$FindBin::Bin/../../lib"; use Test::More tests => 10; use Catalyst::Test 'TestApp'; - use HTTP::Headers::Util 'split_header_words'; my $expected = { - Catalyst => [qw( Catalyst Cool path / )], - Cool => [qw( Cool Catalyst path / )] + Catalyst => [qw|Catalyst Cool path /|], + Cool => [qw|Cool Catalyst path /|] }; { @@ -26,8 +25,9 @@ my $expected = { my $cookies = {}; - for my $cookie ( split_header_words( $response->header('Set-Cookie') ) ) { - $cookies->{ $cookie->[0] } = $cookie; + for my $string ( $response->header('Set-Cookie') ) { + my $cookie = [ split_header_words $string]; + $cookies->{ $cookie->[0]->[0] } = $cookie->[0]; } is_deeply( $cookies, $expected, 'Response Cookies' ); @@ -43,8 +43,9 @@ my $expected = { my $cookies = {}; - for my $cookie ( split_header_words( $response->header('Set-Cookie') ) ) { - $cookies->{ $cookie->[0] } = $cookie; + for my $string ( $response->header('Set-Cookie') ) { + my $cookie = [ split_header_words $string]; + $cookies->{ $cookie->[0]->[0] } = $cookie->[0]; } is_deeply( $cookies, $expected, 'Response Cookies' );