]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blobdiff - test/bliptv_test.rb
Added the OGG/Vorbis format parsing to Bliptv.
[dead/whatever-dl.git] / test / bliptv_test.rb
index 8a763fe7d06fa548b00ab29a3e784107aa36481d..ef2d84a57d33ea0f945063fceb87db4bee5b9f41 100644 (file)
@@ -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