Skip to content
Browse files

fixed tests for new xisbn URL

  • Loading branch information...
1 parent c509816 commit 1e9eac9c5856d4cdab83ca668514fc6ceda553e8 @nichtich nichtich committed Jul 19, 2011
Showing with 6 additions and 6 deletions.
  1. +4 −4 ISBN/t/xisbn.t
  2. +2 −2 ISBN/t/xisbn10.t
View
8 ISBN/t/xisbn.t
@@ -5,7 +5,7 @@ use Test::More;
BEGIN {
require IO::Socket;
- my $host = 'labs.oclc.org';
+ my $host = 'xisbn.worldcat.org';
my $socket = IO::Socket::INET->new(
PeerAddr => "$host:80",
@@ -35,7 +35,7 @@ my $hash = {
'0684833395' => [qw(0671502336 044011120X 0679437223 0440204399 0886461251 0684865130 067189854X 070898164X 1560549602 0736690859 0736689621 0671202960 0224613286 0886464935 5237000665 9660301588 1560549238 8401410266 9576773075 0552015008 2246269318 8388087398 5718100012 8306023056 4653014507 5770770910 8385855807 7805676291 8939202376 8939202384 8939202392 9633070597 9735761599 3596125723 5273001285 7531213451 8387974811 8474444896 8501009261 8700199583 8700964344 8845228827 9146133690 9512045583 9635483325)],
};
-plan tests => 6 * keys %$hash + 1;
+plan tests => 6 * keys(%$hash) + 1;
use_ok( "Business::ISBN" );
@@ -47,7 +47,7 @@ foreach my $string ( sort keys %$hash )
ok( $isbn->is_valid, "$isbn is valid" );
is( $isbn->_xisbn_url,
- "http://labs.oclc.org/xisbn/$string",
+ "http://xisbn.worldcat.org/xid/isbn/$string",
"URL is correct for $string" );
my $expected = $hash->{$isbn};
@@ -67,4 +67,4 @@ foreach my $string ( sort keys %$hash )
}
__END__
-http://labs.oclc.org/xisbn/9780596527242
+http://xisbn.worldcat.org/xid/isbn/9780596527242
View
4 ISBN/t/xisbn10.t
@@ -5,7 +5,7 @@ use Test::More;
BEGIN {
require IO::Socket;
- my $host = 'labs.oclc.org';
+ my $host = 'xisbn.worldcat.org';
my $socket = IO::Socket::INET->new(
PeerAddr => "$host:80",
@@ -49,7 +49,7 @@ foreach my $string ( @isbns )
ok( $isbn->is_valid, "$isbn is valid" );
is( $isbn->_xisbn_url,
- "http://labs.oclc.org/xisbn/$string",
+ "http://xisbn.worldcat.org/xid/isbn/$string",
"URL is correct for $string" );
my $expected = $hash->{$isbn};

0 comments on commit 1e9eac9

Please sign in to comment.
Something went wrong with that request. Please try again.