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

Shawn Moore sartak at bestpractical.com
Thu Feb 10 15:33:18 EST 2011


The branch, master has been updated
       via  3b7b0d834144537ba936457d20634504cad52531 (commit)
      from  697d95ab86fb7086cc168aa98b3276a59b800f64 (commit)

Summary of changes:
 lib/Jifty/Plugin/RecordHistory/View.pm      |    2 +-
 t/TestApp-Plugin-RecordHistory/t/005-view.t |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 3b7b0d834144537ba936457d20634504cad52531
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Feb 10 15:33:06 2011 -0500

    Actual tests for the history template output

diff --git a/lib/Jifty/Plugin/RecordHistory/View.pm b/lib/Jifty/Plugin/RecordHistory/View.pm
index 5d62262..8dffa6a 100644
--- a/lib/Jifty/Plugin/RecordHistory/View.pm
+++ b/lib/Jifty/Plugin/RecordHistory/View.pm
@@ -176,7 +176,7 @@ template 'change_field' => sub {
 
     li {
         { class is 'change-field' };
-        _("%1 changed from '%2' to '%3'.", $field, $old, $new);
+        _("%1 changed from '%2' to '%3'", $field, $old, $new);
     };
 };
 
diff --git a/t/TestApp-Plugin-RecordHistory/t/005-view.t b/t/TestApp-Plugin-RecordHistory/t/005-view.t
index 7070dfc..6f14a2b 100644
--- a/t/TestApp-Plugin-RecordHistory/t/005-view.t
+++ b/t/TestApp-Plugin-RecordHistory/t/005-view.t
@@ -2,7 +2,7 @@
 use warnings;
 use strict;
 
-use Jifty::Test::Dist tests => 20;
+use Jifty::Test::Dist tests => 8;
 my $server = Jifty::Test->make_server;
 isa_ok($server, 'Jifty::TestServer');
 my $URL  = $server->started_ok;
@@ -20,4 +20,8 @@ $book->set_author('Aldous Huxley');
 $book->end_change;
 
 $mech->get_ok($URL . '/book/history?id=' . $book->id);
+$mech->text_contains("Record created by 0");
+$mech->text_contains("Record updated by 0");
+$mech->text_contains("title changed from '1984' to 'Brave New World'");
+$mech->text_contains("author changed from '' to 'Aldous Huxley'");
 

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



More information about the Bps-public-commit mailing list