[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 0.05-3-g484c472

Shawn Moore sartak at bestpractical.com
Thu Feb 24 18:25:28 EST 2011


The branch, master has been updated
       via  484c472a156886d509c1c4e32d311aeb3510f77a (commit)
      from  3bb8725d52c437b612c62f28e685fb0dd7260c6f (commit)

Summary of changes:
 .../lib/TestApp/Plugin/RecordHistory/Model/User.pm |   16 ++++++++++++++++
 t/TestApp-Plugin-RecordHistory/t/005-view.t        |    4 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/User.pm

- Log -----------------------------------------------------------------
commit 484c472a156886d509c1c4e32d311aeb3510f77a
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Feb 24 18:25:15 2011 -0500

    Begin adding a User class for access control tests

diff --git a/t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/User.pm b/t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/User.pm
new file mode 100644
index 0000000..38ac69b
--- /dev/null
+++ b/t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/User.pm
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+package TestApp::Plugin::RecordHistory::Model::User;
+use Jifty::DBI::Schema;
+
+use TestApp::Plugin::RecordHistory::Record schema {
+    column name =>
+        type is 'varchar',
+        default is 'anonymous';
+};
+
+sub current_user_can { 1 }
+
+1;
+
diff --git a/t/TestApp-Plugin-RecordHistory/t/005-view.t b/t/TestApp-Plugin-RecordHistory/t/005-view.t
index 94ef2d2..9d27eb8 100644
--- a/t/TestApp-Plugin-RecordHistory/t/005-view.t
+++ b/t/TestApp-Plugin-RecordHistory/t/005-view.t
@@ -20,8 +20,8 @@ $book->set_author('Aldous Huxley');
 $book->end_change;
 
 $mech->get_ok($URL . '/book/history?id=' . $book->id);
-$mech->text_contains("Book created by 0");
-$mech->text_contains("Book updated by 0");
+$mech->text_contains("Book created by somebody");
+$mech->text_contains("Book updated by somebody");
 $mech->text_contains("title changed from 1984 to Brave New World");
 $mech->text_contains("author changed from (no value) to Aldous Huxley");
 

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



More information about the Bps-public-commit mailing list