]> iEval git - lyrics-fetcher-lyricstranslate.git/commitdiff
Test new functionality
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 15 Oct 2016 16:52:45 +0000 (17:52 +0100)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 15 Oct 2016 16:52:45 +0000 (17:52 +0100)
t/01-network.t

index c924884040f3f611fe33972b5795299b33b6878f..55d5850e4ffed8b41d43f81ff793a1e0456c434d 100644 (file)
@@ -2,14 +2,33 @@
 use strict;
 use warnings;
 
-use Test::More;
 use Test::RequiresInternet ('lyricstranslate.com' => 80);
+use Test::More tests => 5;
 
-plan tests => 1;
-
+use Lyrics::Fetcher;
 use Lyrics::Fetcher::LyricsTranslate;
 
 like (
        Lyrics::Fetcher::LyricsTranslate->fetch('Lyube', 'Kombat'),
        qr/soldiers/i,
        'lyrics to Lyube - Kombat contain the word "soldiers"');
+
+like (
+       Lyrics::Fetcher->fetch('Lyube', 'Kombat', 'LyricsTranslate'),
+       qr/soldiers/i,
+       'usage via Lyrics::Fetcher');
+
+like (
+       Lyrics::Fetcher::LyricsTranslate->fetch('Lyube', 'Kombat', 'English'),
+       qr/soldiers/i,
+       'language selection: English');
+
+like (
+       Lyrics::Fetcher::LyricsTranslate->fetch('Lyube', 'Kombat', 'English'),
+       qr/soldiers/i,
+       'language selection: 328');
+
+like (
+       Lyrics::Fetcher::LyricsTranslate->fetch('Lyube', 'Kombat', 'Transliteration'),
+       qr/soldaty/i,
+       'language selection: Transliteration');
This page took 0.024574 seconds and 4 git commands to generate.