From 97de0b8d84c378653a6423016d4e22ecca933385 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 15 Oct 2016 17:52:45 +0100 Subject: [PATCH] Test new functionality --- t/01-network.t | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) 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'); -- 2.39.2