From 6e47abe654614230be554693b9d0bd9286d06b4d Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 12 Sep 2010 22:38:09 -0700 Subject: [PATCH] Test that the RSS Aspect propagates the URL fragment. --- t/Content/Asset.t | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/t/Content/Asset.t b/t/Content/Asset.t index 9942c533a..2f435e225 100644 --- a/t/Content/Asset.t +++ b/t/Content/Asset.t @@ -227,9 +227,6 @@ isnt( $notModifiedSession->http->getStatus, "304", "logged in user doesn't get 3 ok( !$notModifiedSession->closed, "session is not closed" ); # Test that requesting a URL that doesn't exist, but one of the permutations does exist, returns undef -#my $default = WebGUI::Asset->getDefault($session); -#my $mockDefault = Test::MockObject::Extends->new($default); -#$mockDefault->mock('addMissing', sub { return "add missing" }); $session->request->setup_body({ }); my $nonexistant_url = WebGUI::Asset->getDefault($session)->get('url'); @@ -238,6 +235,18 @@ $output = WebGUI::Content::Asset::dispatch( $session, $nonexistant_url ); is $output, undef, 'getting a URL which does not exist returns undef'; is $session->asset, undef, '... session asset is not set'; +use WebGUI::Asset::RssAspectDummy; +my $dummy = WebGUI::Asset->getImportNode($session)->addChild({ + className => 'WebGUI::Asset::RssAspectDummy', + url => '/home/shawshank', + title => 'Dummy Title', + synopsis => 'Dummy Synopsis', + description => 'Dummy Description', +}); +WebGUI::Test->addToCleanup($dummy); +$output = WebGUI::Content::Asset::dispatch( $session, '/home/shawshank/no-child-here' ); +is $output, undef, 'RSS Aspect propagates the fragment'; + done_testing; #vim:ft=perl