Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pending perlDreamer's comments...:
Revert "Mobile template is not being inherited  (#12246)"

This reverts commit a462466.
  • Loading branch information
scottwalters committed Sep 7, 2011
1 parent a462466 commit d65fd7e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 0 additions & 2 deletions lib/WebGUI/Asset.pm
Expand Up @@ -2921,8 +2921,6 @@ sub www_add {
encryptPage => $self->get("encryptPage"),
styleTemplateId => $self->get("styleTemplateId"),
printableStyleTemplateId => $self->get("printableStyleTemplateId"),
mobileStyleTemplateId => $self->get("mobileStyleTemplateId"),
mobileTemplateId => $self->get("mobileTemplateId"),
isHidden => $self->get("isHidden"),
className=>$class,
assetId=>"new",
Expand Down
24 changes: 1 addition & 23 deletions t/Asset/Wobject/Layout.t
Expand Up @@ -16,9 +16,8 @@ use lib "$FindBin::Bin/../../lib";
use Test::MockTime qw/:all/; ##Must be loaded before all other code
use WebGUI::Test;
use WebGUI::Session;
use Test::More tests => 5; # increment this value for each test you create
use Test::More tests => 3; # increment this value for each test you create
use WebGUI::Asset::Wobject::Layout;
use WebGUI::Asset::Template;

my $session = WebGUI::Test->session;

Expand Down Expand Up @@ -65,25 +64,4 @@ set_relative_time(-100);
$snip1 = $snip1->addRevision({ title => 'titular', }, 18);
is $page->getContentLastModifiedBy, $revised_user1->userId, '... check that a new revision tracks';

# inheriting mobileStyleTemplateId and mobileTemplateId; from ``Mobile template is not being inherited (#12246)''

my $importNode = WebGUI::Asset::Template->getImportNode($session);
my $template1 = $importNode->addChild({className=>"WebGUI::Asset::Template"});
my $template2 = $importNode->addChild({className=>"WebGUI::Asset::Template"});
WebGUI::Test->addToCleanup($template1, $template2);

my $mobileStyleTemplateId = $template1->getId;
my $mobileTemplateId = $template2->getId;
$page->update({ mobileStyleTemplateId => $mobileStyleTemplateId, mobileTemplateId => $mobileTemplateId });
my $url = $page->get('url') . '/layout_child_test';
my $html = WebGUI::Test->getPage($page, "www_add", {
userId => 3,
formParams => {
class => 'WebGUI::Asset::Wobject::Layout',
url => $page->get('url') . '/layout_child_test',
},
});

like $html, qr/name="mobileTemplateId" value="$mobileTemplateId"/, 'child PageLayout inherited parents mobileTempaleId';
like $html, qr/name="mobileStyleTemplateId" value="$mobileStyleTemplateId"/, 'child PageLayout inherited parents mobileStyleTempaleId';

0 comments on commit d65fd7e

Please sign in to comment.