Fix broken templateId in Session/Style/process when useEmptyStyle was
requested. It used to be 6, but at somepoint in the 6.x cycle it was changed to be PBtmpl0000000000000132 in the database. Added tests that verify that it works correctly.
This commit is contained in:
parent
6cf1afc6a7
commit
b1bb5d0b58
3 changed files with 9 additions and 3 deletions
|
|
@ -12,6 +12,7 @@
|
|||
- fix: Events Calendar: error in "big" template (Martin Kamerbeek / Procolix)
|
||||
- fix: PM task editor not preserving duration
|
||||
- fix: PM project completion percentage updates not working right
|
||||
- fix: useEmptyStyle caused invalid template to be used
|
||||
- Added ability to download an SQLReport in either CSV or as a template.
|
||||
- Added ability for Products to add a user to a group when purchased.
|
||||
- Changed the ?op=editProduct form to a TabForm.
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ sub process {
|
|||
} elsif ($self->session->scratch->get("personalStyleId") ne "") {
|
||||
$templateId = $self->session->scratch->get("personalStyleId");
|
||||
} elsif ($self->{_useEmptyStyle}) {
|
||||
$templateId = 6;
|
||||
$templateId = 'PBtmpl0000000000000132';
|
||||
}
|
||||
$var{'head.tags'} = '
|
||||
<meta name="generator" content="WebGUI '.$WebGUI::VERSION.'" />
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ use WebGUI::Session;
|
|||
use WebGUI::Asset;
|
||||
use WebGUI::VersionTag;
|
||||
|
||||
use Test::More tests => 38; # increment this value for each test you create
|
||||
use Test::More tests => 39; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
|
@ -150,7 +150,8 @@ is($macroOutput, 1, 'generateAdditionalHeadTags: process a macro');
|
|||
|
||||
####################################################
|
||||
#
|
||||
# process
|
||||
# process
|
||||
# useEmptyStyle
|
||||
#
|
||||
####################################################
|
||||
|
||||
|
|
@ -163,6 +164,10 @@ is($style->process('body.content', 'notATemplateId'),
|
|||
|
||||
is($style->sent, 1, 'process: sets sent to 1');
|
||||
|
||||
$style->useEmptyStyle(1);
|
||||
|
||||
is($style->process('body.content'), "body.content", 'process, useEmptyStyle: valid data returned');
|
||||
|
||||
my ($versionTag, $personalTemplate) = setup_assets($session);
|
||||
|
||||
$session->scratch->set('personalStyleId', $personalTemplate->getId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue