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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Sep 7 05:14:13 EDT 2009


The branch, master has been updated
       via  a1f78e8ab7f46ecdb743f21903d72f0ea4f94fa7 (commit)
      from  2829860561bc2bb8f2f38b3001ae6155ab4b5408 (commit)

Summary of changes:
 t/01-base.t |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

- Log -----------------------------------------------------------------
commit a1f78e8ab7f46ecdb743f21903d72f0ea4f94fa7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Sep 7 17:14:09 2009 +0800

    01-base.t tests Base.pm

diff --git a/t/01-base.t b/t/01-base.t
index 33cafcc..449dce2 100644
--- a/t/01-base.t
+++ b/t/01-base.t
@@ -4,35 +4,35 @@ use warnings;
 use Test::More tests => 13;
 use MIME::Base64;
 
-use_ok('Net::Lighthouse');
-can_ok( 'Net::Lighthouse', 'new' );
-my $lh = Net::Lighthouse->new( account => 'sunnavy' );
-isa_ok( $lh, 'Net::Lighthouse' );
+use_ok('Net::Lighthouse::Base');
+can_ok( 'Net::Lighthouse::Base', 'new' );
+my $base = Net::Lighthouse::Base->new( account => 'sunnavy' );
+isa_ok( $base, 'Net::Lighthouse::Base' );
 for (qw/account auth base_url ua/) {
-    can_ok( $lh, $_ );
+    can_ok( $base, $_ );
 }
 
-is( $lh->base_url, 'http://sunnavy.lighthouseapp.com', 'base_url' );
-isa_ok( $lh->ua, 'LWP::UserAgent' );
+is( $base->base_url, 'http://sunnavy.lighthouseapp.com', 'base_url' );
+isa_ok( $base->ua, 'LWP::UserAgent' );
 is(
-    $lh->ua->default_header('User-Agent'),
+    $base->ua->default_header('User-Agent'),
     "net-lighthouse/$Net::Lighthouse::VERSION",
     'agent of ua'
 );
 
-is( $lh->ua->default_header('Content-Type'),
+is( $base->ua->default_header('Content-Type'),
     'application/xml', 'content-type of ua' );
 
 my $token = 'a' x 40;
-$lh->auth->{token} = $token;
-is( $lh->ua->default_header('X-LighthouseToken'),
+$base->auth->{token} = $token;
+is( $base->ua->default_header('X-LighthouseToken'),
     $token, 'X-LighthouseToken of ua' );
-$lh->auth->{email} = 'mark at twain.org';
-$lh->auth->{password} = 'huckleberry';
-my $auth_base64 = encode_base64( $lh->auth->{email} . ':' . $lh->auth->{password} );
+$base->auth->{email} = 'mark at twain.org';
+$base->auth->{password} = 'huckleberry';
+my $auth_base64 = encode_base64( $base->auth->{email} . ':' . $base->auth->{password} );
 chomp $auth_base64;
 is(
-    $lh->ua->default_header('Authorization'),
+    $base->ua->default_header('Authorization'),
     'Basic ' . $auth_base64,
     'Authorization of ua'
 );

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



More information about the Bps-public-commit mailing list