From: Michael Orlitzky Date: Thu, 1 Apr 2010 04:37:11 +0000 (-0400) Subject: Added tests for the new Veoh URL formats. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=a2db80e86e587d5e4e89a02a56439e6c39cdebdf;p=dead%2Fwhatever-dl.git Added tests for the new Veoh URL formats. --- diff --git a/test/veoh_test.rb b/test/veoh_test.rb index ad37267..f28229a 100644 --- a/test/veoh_test.rb +++ b/test/veoh_test.rb @@ -34,6 +34,20 @@ class VeohTest < Test::Unit::TestCase assert_equal('v15795090Z6mZAbSq', video_id) end + + def test_parse_third_video_id + v = Veoh.new('http://www.veoh.com/group/suggested-anime-w1st-episodes/?source=homepageList#watch%3Dv19961527w773Qq5G') + video_id = v.send('parse_video_id') + assert_equal('v19961527w773Qq5G', video_id) + end + + + def test_parse_fourth_video_id + v = Veoh.new('http://www.veoh.com/browse/videos/category/anime/watch/v19568793XZq2SRzZ') + video_id = v.send('parse_video_id') + assert_equal('v19568793XZq2SRzZ', video_id) + end + def test_parse_redirect_url v = Veoh.new(nil) @@ -71,6 +85,8 @@ class VeohTest < Test::Unit::TestCase def test_owns_veoh_urls assert(Veoh.owns_url?('http://www.veoh.com/videos/v801204yMZ8BWcC')) assert(Veoh.owns_url?('http://www.veoh.com/videos/v15795090Z6mZAbSq')) + assert(Veoh.owns_url?('http://www.veoh.com/group/suggested-anime-w1st-episodes/?source=homepageList#watch%3Dv19961527w773Qq5G')) + assert(Veoh.owns_url?('http://www.veoh.com/browse/videos/category/anime/watch/v19568793XZq2SRzZ')) end end