Commit | Line | Data |
---|---|---|
76ed8698 MG |
1 | #!/usr/bin/perl |
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | use Test::RequiresInternet 'www.imdb.com' => 80; | |
6 | use Test::More tests => 2; | |
7 | use App::IMDBtop; | |
8 | ||
9 | App::IMDBtop::add_film 'tt0114814'; | |
10 | ||
11 | ok ((grep { $App::IMDBtop::cast_cache{$_} =~ /Kevin Spacey/i && $App::IMDBtop::cast_count{$_} > 0 } keys %App::IMDBtop::cast_count), 'Kevin Spacey starred in The Usual Suspects (using movie id)'); | |
12 | ||
13 | %App::IMDBtop::cast_count = %App::IMDBtop::cast_cache = (); | |
14 | ||
15 | App::IMDBtop::add_film 'The Usual Suspects'; | |
16 | ||
17 | ok ((grep { $App::IMDBtop::cast_cache{$_} =~ /Kevin Spacey/i && $App::IMDBtop::cast_count{$_} > 0 } keys %App::IMDBtop::cast_count), 'Kevin Spacey starred in The Usual Suspects (using movie name)'); |