added basic GoogleBooks JSON API
[Biblio-Z3950.git] / t / 3-GoogleBooks.t
diff --git a/t/3-GoogleBooks.t b/t/3-GoogleBooks.t
new file mode 100755 (executable)
index 0000000..3889d7c
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use Test::More tests => 7;
+
+use_ok 'GoogleBooks';
+
+ok( my $o = GoogleBooks->new(), 'new' );
+
+ok( my $hits = $o->search( 'croatia' ), 'search' );
+like $hits, qr/^\d+$/, "hits: $hits";
+
+foreach ( 1 .. 3 ) {
+
+       ok( my $marc = $o->next_marc, "next_marc $_" );
+       diag $marc;
+
+}