X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=test%2Fbliptv_test.rb;h=ef2d84a57d33ea0f945063fceb87db4bee5b9f41;hp=8a763fe7d06fa548b00ab29a3e784107aa36481d;hb=a4311fa8fc9115fe2d5821aa25f38b0025505b26;hpb=1bbc47ddc336e2cba7e8449613dee97f3c58d6ef diff --git a/test/bliptv_test.rb b/test/bliptv_test.rb index 8a763fe..ef2d84a 100644 --- a/test/bliptv_test.rb +++ b/test/bliptv_test.rb @@ -129,8 +129,8 @@ class BliptvTest < Test::Unit::TestCase end - def test_parse_mp4_video_url - # And why not check one of the MP4 pages, too? + def test_parse_default_video_url + # Check one of the pages without alternatives. btv = Bliptv.new(nil) @@ -143,5 +143,22 @@ class BliptvTest < Test::Unit::TestCase test_result = btv.send('parse_video_url', page_data) assert_equal('http://blip.tv/file/get/Kantel-UbiUndPythonDemo816.flv', test_result) end + + + def test_parse_ogg_video_url + # Make sure the OGG/Vorbis parsing works. + + btv = Bliptv.new(nil) + + page_data = nil + + File.open('test/fixtures/bliptv/2788616.htm') do |f| + page_data = f.read + end + + test_result = btv.send('parse_video_url', page_data) + assert_equal('http://blip.tv/file/get/Fosslc-StateOfPostGIS596.ogg', test_result) + end + end