[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 0.05-10-gd98bf9c
Shawn Moore
sartak at bestpractical.com
Thu Feb 24 19:20:54 EST 2011
The branch, master has been updated
via d98bf9ca9646bea133e9fd097ed7e98f9855a5c4 (commit)
from 70589c364c7971c27526fc16e745126c94d3c7d1 (commit)
Summary of changes:
.../t/008-access-control.t | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit d98bf9ca9646bea133e9fd097ed7e98f9855a5c4
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Thu Feb 24 19:20:43 2011 -0500
Make sure we don't jump the gun with failed deletes
diff --git a/t/TestApp-Plugin-RecordHistory/t/008-access-control.t b/t/TestApp-Plugin-RecordHistory/t/008-access-control.t
index a664b5d..871ec25 100644
--- a/t/TestApp-Plugin-RecordHistory/t/008-access-control.t
+++ b/t/TestApp-Plugin-RecordHistory/t/008-access-control.t
@@ -2,7 +2,7 @@
use warnings;
use strict;
-use Jifty::Test::Dist tests => 51;
+use Jifty::Test::Dist tests => 55;
my $user = TestApp::Plugin::RecordHistory::Model::User->new;
$user->create(
@@ -112,3 +112,18 @@ $ticket->load($ticket->id);
is($ticket->forced_readable, 1, "ticket was updated");
is($ticket->changes->count, 6, "all the changes");
+
+$ticket->set_forced_deletable(0);
+$ticket->delete;
+$ticket->load($super_ticket->id);
+ok($ticket->id, 'still have a record');
+
+is($ticket->changes->count, 7, "a new change from updating the record, but we couldn't ");
+
+$ticket->set_forced_deletable(1);
+$ticket->delete;
+$ticket->load($super_ticket->id);
+ok(!$ticket->id, 'still have a record');
+
+is($ticket->changes->count, 0, "all changes gone now");
+
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list