Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
arhuman committed Oct 10, 2013
1 parent dc66740 commit 7e4a2ec
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions t/300-AFRINIC.t
@@ -1,15 +1,12 @@
use strict;
use warnings;

use Test::More qw(no_plan);

our $class;
BEGIN {
$class = 'Net::Whois::Generic';
use_ok $class;
}
use_ok 'Net::Whois::Generic';

my $c = Net::Whois::Generic->new( disconnected => 1, unfiltered => 1 );
isa_ok $c, $class;
isa_ok $c, 'Net::Whois::Generic';

my $org;
eval { ($org) = $c->query( 'ORG-AFNC1-AFRINIC', { type => 'organisation' } ) };
Expand All @@ -18,11 +15,10 @@ isa_ok $org, 'Net::Whois::Object::Organisation::AFRINIC';

my $inetnum;
my @o;
eval { @o = $c->query( '105.0.0.1') };
eval { @o = $c->query('105.0.0.1') };
ok !$@, qq{Client performs queries without dying $@};
for my $o (@o) {
my $type = ref $o;
ok($type =~ /(AFRINIC|Information)/, "Object ".$o->class." returned");
ok( $type =~ /(AFRINIC|Information)/, "Object " . $o->class . " returned" );
}

done_testing();

0 comments on commit 7e4a2ec

Please sign in to comment.