From 9dd40f61d7a9d4f3339b10fa63e4344f256b6e81 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 6 Dec 2015 23:52:50 +0200 Subject: [PATCH] Add some tests that attempt to catch dummy results --- t/50-network.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/50-network.t b/t/50-network.t index 14a9cb9..c67d2d3 100644 --- a/t/50-network.t +++ b/t/50-network.t @@ -3,7 +3,7 @@ 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; @@ -12,3 +12,6 @@ cmp_ok @results, '>=', 1, 'youtube'; @results = off "http://youtube.com/watch?v=Tj75Arhq5ho", 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"'; -- 2.39.2