X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=test%2Fyouporn_remote_test.rb;h=79bcb3726ce496a3b55d4429059782f05ad43362;hp=6dd26d789f6a1f72d9051188bb8bc6d0a1b263eb;hb=83e06f83d8274cb32a406739839d56e759664b09;hpb=2c835ed7a247ed5639277bc9674b848722ad998d diff --git a/test/youporn_remote_test.rb b/test/youporn_remote_test.rb index 6dd26d7..79bcb37 100644 --- a/test/youporn_remote_test.rb +++ b/test/youporn_remote_test.rb @@ -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