on short read from SIP2 server reopen connection
[Biblio-RFID.git] / t / 10-3M-810.t
index 238cc8f..b2bcc0e 100755 (executable)
@@ -6,13 +6,13 @@ use Data::Dump qw(dump);
 use lib 'lib';
 
 BEGIN {
-       use_ok( 'RFID::Biblio::3M810' );
+       use_ok( 'Biblio::RFID::Reader::3M810' );
 }
 
-ok( my $o = RFID::Biblio::3M810->new( device => '/dev/ttyUSB0' ), 'new' );
+ok( my $o = Biblio::RFID::Reader::3M810->new( device => '/dev/ttyUSB0' ), 'new' );
 
-ok( my @tags = $o->inventory, 'inventory' );
-diag dump @tags;
+my @tags = $o->inventory;
+diag 'inventory ',join(' ',@tags);
 
 my $old_afi;
 
@@ -22,7 +22,7 @@ foreach my $tag ( @tags ) {
 
        ok( my $afi = $o->read_afi( $tag ), "read_afi $tag" );
 
-       ok( $o->write_blocks( $tag, $blocks ), "write_blocks $tag" );
+       ok( $o->write_blocks( $tag, $blocks->{$tag} ), "write_blocks $tag" );
 
        my $new_afi = "\x42";
 
@@ -34,7 +34,4 @@ foreach my $tag ( @tags ) {
 
 }
 
-ok( my $visible = $o->scan, 'scan' );
-diag dump $visible;
-
 done_testing();