[Rt-commit] r2267 - in rtfm/branches/2.1-TESTING: . lib/RT/FM t
jesse at bestpractical.com
jesse at bestpractical.com
Sun Feb 27 21:52:07 EST 2005
Author: jesse
Date: Sun Feb 27 21:52:05 2005
New Revision: 2267
Modified:
rtfm/branches/2.1-TESTING/ (props changed)
rtfm/branches/2.1-TESTING/lib/RT/FM/Article_Overlay.pm
rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t
Log:
r6100 at hualien: jesse | 2005-02-27 21:48:36 -0500
Article_Overlay tests pass
Modified: rtfm/branches/2.1-TESTING/lib/RT/FM/Article_Overlay.pm
==============================================================================
--- rtfm/branches/2.1-TESTING/lib/RT/FM/Article_Overlay.pm (original)
+++ rtfm/branches/2.1-TESTING/lib/RT/FM/Article_Overlay.pm Sun Feb 27 21:52:05 2005
@@ -488,10 +488,10 @@
return ( 0, $self->loc("Permission Denied") );
}
- $self->_NewTransaction( Type => 'Core',
+ $self->_NewTransaction( Type => 'Set',
Field => $args{'Field'},
- NewContent => $args{'Value'},
- OldContent => $self->__Value( $args{'Field'} ) );
+ NewValue => $args{'Value'},
+ OldValue => $self->__Value( $args{'Field'} ) );
return ( $self->SUPER::_Set(%args) );
Modified: rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t
==============================================================================
--- rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t (original)
+++ rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t Sun Feb 27 21:52:05 2005
@@ -99,7 +99,7 @@
($id, $msg) = $article_a->AddLink( Type => 'RefersTo', Target => $article_b->URI);
ok($id,$msg);
-# Make sure that Article B's "ReferredToBy" links object refers to to this article"
+# Make sure that Article Bs "ReferredToBy" links object refers to to this article
my $refers_to_b = $article_b->ReferredToBy;
ok($refers_to_b->Count == 1, "Found one thing referring to b");
my $first = $refers_to_b->First;
@@ -215,18 +215,18 @@
ok($art->__Value('URI') eq $art->URIObj->URI, "The uri in the db is set correctly");
-
+my $art_id = $art->id;
$art = RT::FM::Article->new($RT::SystemUser);
-$art->Load(1);
-ok ($art->Id == 1, "Loaded article 1");
+$art->Load($art_id);
+ok ($art->Id == $art_id, "Loaded article 1");
my $s =$art->Summary;
($val, $msg) = $art->SetSummary("testFoo");
ok ($val, $msg);
ok ($art->Summary eq 'testFoo', "The Summary was set to foo");
my $t = $art->Transactions();
my $trans = $t->Last;
-ok ($trans->Type eq 'Core', "It's a core transaction");
+ok ($trans->Type eq 'Set', "It's a Set transaction");
ok ($trans->Field eq 'Summary', "it is about setting the Summary");
-ok ($trans->NewContent eq 'testFoo', "The new content is 'foo'");
-ok ($trans->OldContent, "There was some old value");
+is ($trans->NewValue , 'testFoo', "The new content is 'foo'");
+is ($trans->OldValue,$s, "the old value was preserved");
More information about the Rt-commit
mailing list