[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 963929771c61c6b1e59cd7fd936797e3844689bf
Shawn Moore
sartak at bestpractical.com
Wed Feb 9 00:22:32 EST 2011
The branch, master has been updated
via 963929771c61c6b1e59cd7fd936797e3844689bf (commit)
via 15ac387031b91d7f5b26e76a84b408835be5ba1c (commit)
from 158308d759f15e00a19063ee7f0157fa052c3cea (commit)
Summary of changes:
.../lib/TestApp/Plugin/RecordHistory/Model/Book.pm | 15 +++++++++++++++
t/TestApp-Plugin-RecordHistory/t/001-basic.t | 14 ++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
create mode 100644 t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/Book.pm
create mode 100644 t/TestApp-Plugin-RecordHistory/t/001-basic.t
- Log -----------------------------------------------------------------
commit 15ac387031b91d7f5b26e76a84b408835be5ba1c
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Feb 9 00:21:53 2011 -0500
Add a basic Book model with RecordHistory for testing
diff --git a/t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/Book.pm b/t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/Book.pm
new file mode 100644
index 0000000..bdbe98c
--- /dev/null
+++ b/t/TestApp-Plugin-RecordHistory/lib/TestApp/Plugin/RecordHistory/Model/Book.pm
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+
+package TestApp::Plugin::RecordHistory::Model::Book;
+use Jifty::DBI::Schema;
+
+use TestApp::Plugin::RecordHistory::Record schema {
+ column title =>
+ type is 'varchar';
+};
+
+use Jifty::Plugin::RecordHistory::Mixin::Model::RecordHistory;
+
+1;
+
commit 963929771c61c6b1e59cd7fd936797e3844689bf
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Feb 9 00:22:27 2011 -0500
Begin adding tests
diff --git a/t/TestApp-Plugin-RecordHistory/t/001-basic.t b/t/TestApp-Plugin-RecordHistory/t/001-basic.t
new file mode 100644
index 0000000..4a723a1
--- /dev/null
+++ b/t/TestApp-Plugin-RecordHistory/t/001-basic.t
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+
+use Jifty::Test::Dist tests => 2;
+
+my $book = TestApp::Plugin::RecordHistory::Model::Book->new;
+$book->create(
+ title => '1984',
+);
+ok($book->id, 'created a book');
+
+isa_ok($book->changes, 'Jifty::Plugin::RecordHistory::Model::ChangeCollection');
+
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list