[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 79cdb6b18dcfdda75d3b74587deec2d86c2dfd0a
Shawn Moore
sartak at bestpractical.com
Wed Feb 9 21:34:51 EST 2011
The branch, master has been updated
via 79cdb6b18dcfdda75d3b74587deec2d86c2dfd0a (commit)
from 1fd9ca286fc7894b51cc0e3e4f536a82bf3e0a11 (commit)
Summary of changes:
t/TestApp-Plugin-RecordHistory/t/004-manual.t | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
create mode 100644 t/TestApp-Plugin-RecordHistory/t/004-manual.t
- Log -----------------------------------------------------------------
commit 79cdb6b18dcfdda75d3b74587deec2d86c2dfd0a
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Feb 9 21:34:35 2011 -0500
Test that begin_change; end_change; does not create an empty update
diff --git a/t/TestApp-Plugin-RecordHistory/t/004-manual.t b/t/TestApp-Plugin-RecordHistory/t/004-manual.t
new file mode 100644
index 0000000..87b57c0
--- /dev/null
+++ b/t/TestApp-Plugin-RecordHistory/t/004-manual.t
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+
+use Jifty::Test::Dist tests => 3;
+
+my $book = TestApp::Plugin::RecordHistory::Model::Book->new;
+$book->create(
+ title => '1984',
+ author => 'George Orwell',
+);
+ok($book->id, 'created a book');
+
+is($book->changes->count, 1);
+
+$book->start_change;
+$book->end_change;
+
+is($book->changes->count, 1, 'a change with no updates should not create a Change');
+
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list