From: Marius Gavrilescu Date: Sat, 15 Oct 2016 16:52:45 +0000 (+0100) Subject: Test new functionality X-Git-Tag: 0.002~1 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=97de0b8d84c378653a6423016d4e22ecca933385;p=lyrics-fetcher-lyricstranslate.git Test new functionality --- diff --git a/t/01-network.t b/t/01-network.t index c924884..55d5850 100644 --- a/t/01-network.t +++ b/t/01-network.t @@ -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');