[Bps-public-commit] net-lighthouse branch, master, updated. 5b8a8b4c863e4f7d3ed3f36d0fe5c56c8bc0d99b

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Aug 31 02:08:50 EDT 2009


The branch, master has been updated
       via  5b8a8b4c863e4f7d3ed3f36d0fe5c56c8bc0d99b (commit)
      from  373fac5c60c745fde26d2bc7c7d36fa0ce979d68 (commit)

Summary of changes:
 t/05-ticket-attachment.t |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 5b8a8b4c863e4f7d3ed3f36d0fe5c56c8bc0d99b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Aug 31 14:08:33 2009 +0800

    updated t/05-ticket-attachment.t

diff --git a/t/05-ticket-attachment.t b/t/05-ticket-attachment.t
index bf3f117..fb512db 100644
--- a/t/05-ticket-attachment.t
+++ b/t/05-ticket-attachment.t
@@ -2,6 +2,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 27;
+use DateTime;
 
 use_ok('Net::Lighthouse::Project::Ticket::Attachment');
 can_ok( 'Net::Lighthouse::Project::Ticket::Attachment', 'new' );
@@ -30,19 +31,26 @@ my $v1 = $attachment->load_from_xml($xml);
 is( $v1, $attachment, 'load return $self' );
 my %hash = (
     'width'        => undef,
-    'uploader_id'  => '67166',
+    'uploader_id'  => 67166,
     'height'       => undef,
-    'size'         => '24',
+    'size'         => 24,
     'content_type' => 'application/octet-stream',
-    'created_at'   => '2009-08-21T11:15:51Z',
+    'created_at'   => DateTime->new( 
+        year   => 2009,
+        month  => 8,
+        day    => 21,
+        hour   => 11,
+        minute => 15,
+        second => 51,
+    ),
     'filename'     => 'first',
     'url'  => 'http://sunnavy.lighthouseapp.com/attachments/249828/first',
     'type' => 'Attachment',
-    'id'   => '249828',
+    'id'   => 249828,
     'code' => '5ace4f26de37855e951eb13f5b07a1b1a0919466'
 
 );
 
 for my $k ( keys %hash ) {
-    is( $v1->$k, $hash{$k}, "$k is loaded" );
+    is_deeply( $v1->$k, $hash{$k}, "$k is loaded" );
 }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list