[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 0.05-9-g70589c3

Shawn Moore sartak at bestpractical.com
Thu Feb 24 19:13:46 EST 2011


The branch, master has been updated
       via  70589c364c7971c27526fc16e745126c94d3c7d1 (commit)
      from  3b826091aca86a8c5051a64b2aea4803df8c3c31 (commit)

Summary of changes:
 .../t/008-access-control.t                         |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 70589c364c7971c27526fc16e745126c94d3c7d1
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Feb 24 19:13:32 2011 -0500

    Make sure that when we can read the record again we get its changes too

diff --git a/t/TestApp-Plugin-RecordHistory/t/008-access-control.t b/t/TestApp-Plugin-RecordHistory/t/008-access-control.t
index 2ddfd4c..a664b5d 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 => 49;
+use Jifty::Test::Dist tests => 51;
 
 my $user = TestApp::Plugin::RecordHistory::Model::User->new;
 $user->create(
@@ -104,3 +104,11 @@ is($ticket->changes->current_user->id, $user->id, 'current user is the user not
 ok(!$ticket->changes->current_user->is_superuser, 'not superuser');
 is($ticket->changes->first, undef, "no readable changes");
 
+$super_ticket->load($ticket->id);
+$super_ticket->set_forced_readable(1);
+
+# flush cache
+$ticket->load($ticket->id);
+
+is($ticket->forced_readable, 1, "ticket was updated");
+is($ticket->changes->count, 6, "all the changes");

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list