[Bps-public-commit] net-lighthouse branch, master, updated. c910a5c62b0b1c47e523b45b73d882857f80e12d
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Sep 1 04:42:45 EDT 2009
The branch, master has been updated
via c910a5c62b0b1c47e523b45b73d882857f80e12d (commit)
from 077f148a5b48dabf1153f33ac61d417505b2e2e6 (commit)
Summary of changes:
t/02-project.t | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit c910a5c62b0b1c47e523b45b73d882857f80e12d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Sep 1 16:42:29 2009 +0800
test project->ticket,ticket_bin...
diff --git a/t/02-project.t b/t/02-project.t
index 2c100d4..4dcbf23 100644
--- a/t/02-project.t
+++ b/t/02-project.t
@@ -1,13 +1,13 @@
use strict;
use warnings;
-use Test::More tests => 70;
+use Test::More tests => 85;
use Test::Mock::LWP;
use DateTime;
use_ok('Net::Lighthouse::Project');
can_ok( 'Net::Lighthouse::Project', 'new' );
-my $project = Net::Lighthouse::Project->new;
+my $project = Net::Lighthouse::Project->new( account => 'sunnavy', id => 1 );
isa_ok( $project, 'Net::Lighthouse::Project' );
isa_ok( $project, 'Net::Lighthouse' );
for my $attr (
@@ -23,14 +23,26 @@ for my $attr (
for my $method (
qw/create update delete load load_from_xml list
- initial_state tickets ticket_bins messages milestones changesets/
+ initial_state tickets ticket_bins messages milestones changesets
+ ticket ticket_bin message milestone changeset
+ /
)
{
can_ok( $project, $method );
}
-$project->account('sunnavy');
+for my $method (qw/ticket ticket_bin message milestone changeset/) {
+ can_ok( $project, $method );
+ if ( $method eq 'ticket_bin' ) {
+ isa_ok( $project->$method, 'Net::Lighthouse::Project::TicketBin' );
+ }
+ else {
+ isa_ok( $project->$method,
+ 'Net::Lighthouse::Project::' . ucfirst $method );
+ }
+}
+$project->account('sunnavy');
$Mock_ua->mock( get => sub { $Mock_response } );
$Mock_ua->mock( default_header => sub { } ); # to erase warning
$Mock_response->mock(
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list