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