X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_core_uri_with.t;h=c8a3ef008d51e93d968a0d79a42d4c24890a9e4c;hb=64628b1805489058fd8dc1de38f95929b8e3c4ae;hp=a35f75846a9d98fe60405a6f9408d8db14c49e0b;hpb=3c9e62941f58bc6d8d22c6b8a2a2f7bf5b1c5ab0;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit_core_uri_with.t b/t/unit_core_uri_with.t index a35f758..c8a3ef0 100644 --- a/t/unit_core_uri_with.t +++ b/t/unit_core_uri_with.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 10; use URI; use_ok('Catalyst::Request'); @@ -48,3 +48,22 @@ is( 'http://127.0.0.1/foo/bar/baz?bar=snort', 'URI changes param' ); + +is( + $request2->uri_with({ bar => [ 'snort', 'ewok' ] }), + 'http://127.0.0.1/foo/bar/baz?bar=snort&bar=ewok', + 'overwrite mode URI appends arrayref param' +); + +is( + $request2->uri_with({ bar => 'snort' }, { mode => 'append' }), + 'http://127.0.0.1/foo/bar/baz?bar=gorch&bar=snort', + 'append mode URI appends param' +); + +is( + $request2->uri_with({ bar => [ 'snort', 'ewok' ] }, { mode => 'append' }), + 'http://127.0.0.1/foo/bar/baz?bar=gorch&bar=snort&bar=ewok', + 'append mode URI appends arrayref param' +); +