X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Funit_load_catalyst_test.t;h=67a11714eae67992634ed8be620d4002acf50a74;hp=1b4d86325cd09df53d97b704cda03aa4e3bbb7e9;hb=4348c28b93ab3f849c2cbabcd10ac69d8a6d1614;hpb=3ab52ff81212ec0704c75d7fc6027b73d48bc59f diff --git a/t/unit_load_catalyst_test.t b/t/unit_load_catalyst_test.t index 1b4d863..67a1171 100644 --- a/t/unit_load_catalyst_test.t +++ b/t/unit_load_catalyst_test.t @@ -7,8 +7,9 @@ use Test::More; use FindBin qw/$Bin/; use lib "$Bin/lib"; use Catalyst::Utils; +use HTTP::Request::Common; -plan tests => 9; +plan tests => 11; use_ok('Catalyst::Test'); @@ -18,6 +19,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 +58,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';