]> iEval git - www-offliberty.git/blobdiff - t/50-network.t
Change test video *again*
[www-offliberty.git] / t / 50-network.t
index 59e77b158ca3fc75a5967e891866b8afb06bee35..98d0c686e125e89a1fd8afa7b2bebff3ba4216cc 100644 (file)
@@ -1,14 +1,17 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 use strict;
 use warnings;
 
 use Test::RequiresInternet 'offliberty.com' => 80;
-use Test::More tests => 2;
+use Test::More tests => 4;
 use WWW::Offliberty qw/off/;
 
 my @results;
-@results = off "http://youtube.com/watch?v=Tj75Arhq5ho";
-is @results, 1, 'youtube';
+@results = off "https://youtube.com/watch?v=dQw4w9WgXcQ";
+cmp_ok @results, '>=', 1, 'youtube';
 
-@results = off "http://youtube.com/watch?v=Tj75Arhq5ho", video_file => 1;
+@results = off "https://youtube.com/watch?v=dQw4w9WgXcQ", video_file => 1;
 is @results, 2, 'youtube, video_file => 1';
+
+like $results[1], qr/\.mp4/, 'video URL contains ".mp4"';
+unlike $results[0], qr/offwarning/, 'audio URL doesn\'t contain "offwarning"';
This page took 0.017204 seconds and 4 git commands to generate.