Test that the RSS Aspect propagates the URL fragment.
This commit is contained in:
parent
587ff397b5
commit
7a3ec47f6d
1 changed files with 13 additions and 4 deletions
|
|
@ -93,7 +93,7 @@ WebGUI::Test->addToCleanup( WebGUI::VersionTag->getWorking( $session ) );
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
plan tests => 22; # Increment this number for each test you create
|
||||
plan tests => 23; # Increment this number for each test you create
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# test getUrlPermutation( url ) method
|
||||
|
|
@ -206,9 +206,6 @@ is $output, 'www_view one', 'an empty URL returns the default asset';
|
|||
$session->setting->set('defaultPage', $originalDefaultPage);
|
||||
|
||||
# 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');
|
||||
|
|
@ -217,4 +214,16 @@ $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';
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue