]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blob - test/youporn_remote_test.rb
Initial commit.
[dead/whatever-dl.git] / test / youporn_remote_test.rb
1 # Remote Youporn tests. Actually hit their website
2 # and attempt to parse the data returned.
3
4 require 'test/unit'
5 require 'src/websites/youporn'
6
7 class YoupornRemoteTest < Test::Unit::TestCase
8
9 def test_get_page_data
10 yp = Youporn.new()
11
12 # We can't rely on the fixture here, because Youporn might
13 # change their page layout. Instead, check that we can actually
14 # find the FLV URL on this page.
15 page_data = yp.send('get_page_data', 'http://www.youporn.com/watch/65778')
16
17 test_result = yp.get_video_url(page_data)
18 assert_equal('http://download.youporn.com/download/112911/flv/65778_moaning_mom_fucked_at_night.flv', test_result)
19 end
20
21 end