]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blobdiff - test/redtube_remote_test.rb
Update all of the Redtube tests for the new class.
[dead/whatever-dl.git] / test / redtube_remote_test.rb
index 6bf44c7bf982b225d83c57e42fe4a434fb3f0949..239e59b308d9ffd1b8f23fa1ef684e49a642eec8 100644 (file)
@@ -22,11 +22,13 @@ require 'src/websites/redtube'
 
 class RedtubeRemoteTest < Test::Unit::TestCase
 
-  def test_get_video_url
-    # Won't work locally because we need the hash_flv attribute from the page.    
+  # This is a remote test because the default get_video_filename()
+  # relies on the video URL. Of course, we don't know the video URL
+  # unless we download and parse the page.
+  def test_get_video_filename
     rt = Redtube.new('http://www.redtube.com/6807')
-    expected_result = 'http://dl.redtube.com/467f9bca32b1989277b48582944f325afa3374/0000006/X57OBH08G.flv/1a9f62001c523752dc9a6bc3f7f5acad/4ac64671'
-    actual_result = rt.get_video_url()
+    expected_result = 'X57OBH08G.flv'
+    actual_result = rt.get_video_filename()
     assert_equal(expected_result, actual_result)
   end