Better error report and small test refactor
[cascardo/www-eztv.git] / t / 01-series.t
index 25d130d..f9354fd 100755 (executable)
@@ -6,8 +6,12 @@ use Test::More;
 BEGIN { use_ok( 'WWW::EZTV' ); }
 
 ok( my $eztv = WWW::EZTV->new, 'Build eztv crawler' );
-isa_ok( $eztv->shows, 'Mojo::Collection' );
-isa_ok( $eztv->shows->[0], 'WWW::EZTV::Show' );
+
+subtest 'Can retrieve shows' => sub {
+    ok( $eztv->has_shows, 'Can fetch shows list' );
+    isa_ok( $eztv->shows, 'Mojo::Collection' );
+    isa_ok( $eztv->shows->[0], 'WWW::EZTV::Show' );
+};
 
 subtest 'All shows has name and URL' => sub {
     my $has_year = 0;