]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blobdiff - test/youporn_remote_test.rb
Made the output filename the responsibility of the website subclass.
[dead/whatever-dl.git] / test / youporn_remote_test.rb
index 6dd26d789f6a1f72d9051188bb8bc6d0a1b263eb..79bcb3726ce496a3b55d4429059782f05ad43362 100644 (file)
@@ -25,15 +25,10 @@ require 'src/websites/youporn'
 class YoupornRemoteTest < Test::Unit::TestCase
   
   def test_get_page_data
-    yp = Youporn.new()
-
-    # We can't rely on the fixture here, because Youporn might
-    # change their page layout. Instead, check that we can actually
-    # find the FLV URL on this page.
-    page_data = yp.send('get_page_data', 'http://www.youporn.com/watch/65778')
-    
-    test_result = yp.get_video_url(page_data)
-    assert_equal('http://download.youporn.com/download/112911/flv/65778_moaning_mom_fucked_at_night.flv', test_result)
+    yp = Youporn.new('http://www.youporn.com/watch/65778')
+    expected_result = 'http://download.youporn.com/download/112911/flv/65778_moaning_mom_fucked_at_night.flv'
+    actual_result = yp.get_video_url()
+    assert_equal(expected_result, actual_result)
   end
     
 end