Skip to content
Permalink
Browse files

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 d65fd7e646bc48d6037157c5bab38f12165bb8a3
Showing with 1 addition and 25 deletions.
  1. +0 −2 lib/WebGUI/Asset.pm
  2. +1 −23 t/Asset/Wobject/Layout.t
@@ -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",
@@ -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;

@@ -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.
You can’t perform that action at this time.