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