Make sure template attachments are duplicated. Fixes bug #11355.
This commit is contained in:
parent
1e7f443126
commit
6fe662ef83
3 changed files with 11 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ use WebGUI::Test;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::Asset::Template;
|
||||
use Exception::Class;
|
||||
use Test::More tests => 43; # increment this value for each test you create
|
||||
use Test::More tests => 44; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
use JSON qw{ from_json };
|
||||
|
||||
|
|
@ -103,6 +103,14 @@ ok(exists $session->style->{_javascript}->{$_}, "$_ in style") for qw(foo bar bo
|
|||
# sleep so the revisiondate isn't duplicated
|
||||
sleep 1;
|
||||
|
||||
my $template3dup = $template3->duplicate;
|
||||
my @atts3dup = map { delete @{ $_ }{qw/attachId templateId revisionDate/}; $_; } @{ $template3dup->getAttachments };
|
||||
cmp_bag(
|
||||
[@atts3dup],
|
||||
[@atts],
|
||||
'attachments are duplicated'
|
||||
);
|
||||
|
||||
my $template3rev = $template3->addRevision();
|
||||
my $att4 = $template3rev->getAttachments('headScript');
|
||||
is($att4->[0]->{url}, 'foo', 'rev has foo');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue