[Bps-public-commit] r17422 - in Net-Trac/trunk: . t
trs at bestpractical.com
trs at bestpractical.com
Tue Dec 30 00:34:33 EST 2008
Author: trs
Date: Tue Dec 30 00:34:33 2008
New Revision: 17422
Modified:
Net-Trac/trunk/ (props changed)
Net-Trac/trunk/lib/Net/Trac/Ticket.pm
Net-Trac/trunk/t/comments.t
Log:
r43273 at zot: tom | 2008-12-30 00:34:04 -0500
a few more tests
Modified: Net-Trac/trunk/lib/Net/Trac/Ticket.pm
==============================================================================
--- Net-Trac/trunk/lib/Net/Trac/Ticket.pm (original)
+++ Net-Trac/trunk/lib/Net/Trac/Ticket.pm Tue Dec 30 00:34:33 2008
@@ -157,7 +157,13 @@
);
my $reply = $self->connection->mech->response;
- $self->load($self->id);
+
+ if ( $reply->is_success ) {
+ return $self->load($self->id);
+ }
+ else {
+ return undef;
+ }
}
sub comment {
Modified: Net-Trac/trunk/t/comments.t
==============================================================================
--- Net-Trac/trunk/t/comments.t (original)
+++ Net-Trac/trunk/t/comments.t Tue Dec 30 00:34:33 2008
@@ -44,3 +44,8 @@
like($ticket->comments->[1]->content, qr/fish/, "The comment looks correct.");
like($ticket->comments->[0]->content, qr/moose/, "The previous comment looks correct.");
+ok($ticket->update( summary => 'Summary #1 updated' ), "Updating summary.");
+like($ticket->summary, qr/Summary #1 updated/, "The summary looks correct");
+is(@{$ticket->history->entries}, 3, "Got three history entries");
+is(@{$ticket->comments}, 2, "Only two comments");
+
More information about the Bps-public-commit
mailing list