X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=blobdiff_plain;f=t%2Fbasic.t;h=ec5e4c788c07735fd4e5635c4a35fd3150779cca;hp=9620451c913ab459df94534e42f4b30ab55c0bb1;hb=91e4fe2d76c8198894f01c4e4de03c6fb1fb7d42;hpb=2bde9162132ed51c98e86106f3b9be65459c12a3 diff --git a/t/basic.t b/t/basic.t index 9620451..ec5e4c7 100644 --- a/t/basic.t +++ b/t/basic.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 13; use Test::MockObject; use Test::MockObject::Extends; @@ -71,3 +71,14 @@ is_deeply( { session => { value => $sessionid, expires => 123 } }, "cookie was set correctly" ); + +$cxt->clear; +$req->clear; + +can_ok( $m, "cookie_is_rejecting" ); + +%req_cookies = ( path => '/foo' ); +$req->set_always( path => '' ); +ok( $cxt->cookie_is_rejecting(\%req_cookies), "cookie is rejecting" ); +$req->set_always( path => 'foo/bar' ); +ok( !$cxt->cookie_is_rejecting(\%req_cookies), "cookie is not rejecting" );