X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2Fveoh_test.rb;h=fdb5bbf17b8d94e9a61ae1221c49def148366113;hb=d516b60e0d6b6a212257ed09f0ed1c1972928450;hp=ad37267fef03f595275e0844f212554027d40be1;hpb=83e06f83d8274cb32a406739839d56e759664b09;p=dead%2Fwhatever-dl.git diff --git a/test/veoh_test.rb b/test/veoh_test.rb index ad37267..fdb5bbf 100644 --- a/test/veoh_test.rb +++ b/test/veoh_test.rb @@ -34,6 +34,27 @@ 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_fifth_video_id + v = Veoh.new('http://www.veoh.com/collection/Keith-Anderson-Music-Videos/watch/v13890200h98YShYN') + video_id = v.send('parse_video_id') + assert_equal('v13890200h98YShYN', video_id) + end + def test_parse_redirect_url v = Veoh.new(nil) @@ -71,6 +92,9 @@ 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')) + assert(Veoh.owns_url?('http://www.veoh.com/collection/Keith-Anderson-Music-Videos/watch/v13890200h98YShYN')) end end