t/10-minimal.t
changeset 10 4243e22505f9
parent 9 b2a26d05b063
child 14 8da9e81acf82
--- a/t/10-minimal.t	Tue Jan 06 13:35:59 2015 +0100
+++ b/t/10-minimal.t	Tue Jan 06 14:21:38 2015 +0100
@@ -5,6 +5,7 @@
 use Test::More;
 use File::Temp;
 use Test::Exception;
+use Storable qw(freeze);
 
 my $tmp = File::Temp->new;
 $tmp->print(<<__);
@@ -21,7 +22,7 @@
 }
 
 # we require it, it's not a normal module
-require_ok 'blib/nagios/plugins/ius/check_dns-serial'
+require_ok 'blib/nagios/plugins/ius/check_dns-delegation'
   or BAIL_OUT q{can't require the module};
 
 
@@ -41,13 +42,17 @@
     is $r2a, $r2b => 'same level3';
     isnt $r1a, $r2a => 'not same google/level3';
 
-    my @a;
-    @a = qw[8.8.8.8];
+    my (@a, @b);
+    @a = qw[8.8.8.1];
     my $r3a = Net::DNS::Resolver->new(nameservers => \@a);
-    @a = qw[8.8.4.4];
+    @a = qw[8.8.4.2];
     my $r3b = Net::DNS::Resolver->new(nameservers => \@a);
+    isnt $r3a, $r3b => 'same ref, but not same object';
 
-    isnt $r3a, $r3b => 'same ref, but not same object';
+    @b = @a;
+    is freeze(\@a), freeze(\@b) => 'frozen lists';
+    my $r3c = Net::DNS::Resolver->new(nameservers => \@b);
+    is $r3b, $r3c => 'same servers, but not same ref';
 
 };