X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_load_catalyst_test.t;h=3c9eca9ee938dddda8d2e9e7d9e18b90d730d8ef;hb=7d9921b1634786926b83a7c9de0dafc69ad506d7;hp=1b4d86325cd09df53d97b704cda03aa4e3bbb7e9;hpb=d258fcb2143b861826a4682d3c04c442f0c1ff9f;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit_load_catalyst_test.t b/t/unit_load_catalyst_test.t index 1b4d863..3c9eca9 100644 --- a/t/unit_load_catalyst_test.t +++ b/t/unit_load_catalyst_test.t @@ -7,8 +7,10 @@ use Test::More; use FindBin qw/$Bin/; use lib "$Bin/lib"; use Catalyst::Utils; +use HTTP::Request::Common; +use Test::Exception; -plan tests => 9; +plan tests => 11; use_ok('Catalyst::Test'); @@ -18,6 +20,8 @@ isnt( $@, "", "get returns an error message with no app specified"); eval "request('http://localhost')"; isnt( $@, "", "request returns an error message with no app specified"); +# FIXME - These vhosts in tests tests should be somewhere else... + sub customize { Catalyst::Test::_customize_request(@_) } { @@ -55,3 +59,11 @@ sub customize { Catalyst::Test::_customize_request(@_) } # Back compat test, extra args used to be ignored, now a hashref of options. use_ok('Catalyst::Test', 'TestApp', 'foobar'); + +# Back compat test, ensure that request ignores anything which isn't a hash. +lives_ok { + request(GET('/dummy'), 'foo'); +} 'scalar additional param to request method ignored'; +lives_ok { + request(GET('/dummy'), []); +} 'array additional param to request method ignored';