[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 0.06-6-g015cb31

Thomas Sibley trs at bestpractical.com
Wed Jun 8 10:32:16 EDT 2011


The branch, master has been updated
       via  015cb31575c367d24b501419f7ec4aec08b6827a (commit)
      from  17ac542b24eab06620e36a146b396d9b817d0035 (commit)

Summary of changes:
 .../t/007-delete-change.t                          |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 015cb31575c367d24b501419f7ec4aec08b6827a
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Jun 8 10:31:38 2011 -0400

    Test that we don't get crap in a delete change's created_by
    
    SQLite doesn't error and just puts crap in the database, but Pg at least
    errors when we try to run the INSERT.

diff --git a/t/TestApp-Plugin-RecordHistory/t/007-delete-change.t b/t/TestApp-Plugin-RecordHistory/t/007-delete-change.t
index 9073369..2b9ceed 100644
--- a/t/TestApp-Plugin-RecordHistory/t/007-delete-change.t
+++ b/t/TestApp-Plugin-RecordHistory/t/007-delete-change.t
@@ -2,7 +2,7 @@
 use warnings;
 use strict;
 
-use Jifty::Test::Dist tests => 21;
+use Jifty::Test::Dist tests => 22;
 
 my $dvd = TestApp::Plugin::RecordHistory::Model::DVD->new;
 $dvd->create(
@@ -41,7 +41,9 @@ $dvd->delete;
 my $changes = Jifty::Plugin::RecordHistory::Model::ChangeCollection->new;
 $changes->unlimit;
 is($changes->count, 1, 'one change');
-is($changes->first->type, 'delete', 'only change is a delete');
+my $first = $changes->first;
+is($first->type, 'delete', 'only change is a delete');
+is($first->__raw_value('created_by'), $dvd->current_user->id, 'delete change created by record current user');
 
 my $change_fields = Jifty::Plugin::RecordHistory::Model::ChangeFieldCollection->new;
 $change_fields->unlimit;

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



More information about the Bps-public-commit mailing list