Retrive episode links by type and some more docs
[cascardo/www-eztv.git] / t / 02-find.t
index 37d6a6e..ec2de31 100644 (file)
@@ -24,6 +24,10 @@ subtest 'Find episodes' => sub {
     diag( 'Version: ' . $ep->version );
     diag( 'Size:    ' . $ep->size );
     is( $ep->name, 'The Walking Dead', 'Name looks good' );
+
+    ok( $ep->has_links, 'Episode has links' );
+    ok( my $link = $ep->find_link(sub{ $_->type eq 'torrent' }), 'Find a torrent link' );
+    ok( $link->url, 'Link has URL' );
 };
 
 done_testing();