assert_equal(expected_filename, actual_filename)
end
-
- def test_parse_video_url
- ef = Efukt.new(nil)
-
- page_data = nil
-
- File.open('test/fixtures/efukt/2304_The_Dumbest_Porno_Ever_Made.html') do |f|
- page_data = f.read
- end
-
- test_result = ef.send('parse_video_url', page_data)
- assert_equal('http://64.62.222.195/video/370c4a4662071261ccd5b833c4d83201/4918d88d/63563562.flv', test_result)
-
- # There are two different filename patterns.
- # This tests the second one. No, there aren't
- # any non-embarrasing videos on eFukt that I could
- # use for fixtures.
- File.open('test/fixtures/efukt/1592_Riding_Bear_Back.html') do |f|
- page_data = f.read
- end
-
- test_result = ef.send('parse_video_url', page_data)
- assert_equal('http://74.82.53.202/video/798309ad4e6b598204aae617bbdf3090/4a99e23f/158.wmv', test_result)
- end
-
end