Update test for exception handling
This commit is contained in:
parent
d690148c2c
commit
01ba8203c8
1 changed files with 5 additions and 5 deletions
|
|
@ -108,7 +108,7 @@ eval {
|
||||||
};
|
};
|
||||||
|
|
||||||
is(
|
is(
|
||||||
$contentLastModified, 0,
|
$contentLastModified, undef,
|
||||||
"Purged Linked Asset: getContentLastModified returns 0 when linked asset missing",
|
"Purged Linked Asset: getContentLastModified returns 0 when linked asset missing",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -122,10 +122,10 @@ init();
|
||||||
$snippet->trash();
|
$snippet->trash();
|
||||||
|
|
||||||
$snippet->purge();
|
$snippet->purge();
|
||||||
$shortcut = $shortcut->cloneFromDb();
|
$shortcut = eval { $shortcut->cloneFromDb(); };
|
||||||
|
|
||||||
ok(
|
ok(
|
||||||
!defined $shortcut,
|
Exception::Class->caught(),
|
||||||
"Purge Linked Asset: Shortcut is purged even though it's in the trash"
|
"Purge Linked Asset: Shortcut is purged even though it's in the trash"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -135,10 +135,10 @@ init();
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Test purging snippet purges shortcut also
|
# Test purging snippet purges shortcut also
|
||||||
$snippet->purge;
|
$snippet->purge;
|
||||||
$shortcut = $shortcut->cloneFromDb();
|
$shortcut = eval { $shortcut->cloneFromDb(); };
|
||||||
|
|
||||||
ok(
|
ok(
|
||||||
!defined $shortcut,
|
Exception::Class->caught(),
|
||||||
"Purge Linked Asset: Shortcut is not defined",
|
"Purge Linked Asset: Shortcut is not defined",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue