X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2Fyikers_test.rb;h=5b6f7f4287bbd517f41a86a0906a1c9999b3d145;hb=HEAD;hp=1c9548d2043061cd4377b379cead5d98336b3e94;hpb=1d43361a1d8c6fc3938a2438baa8d8348129b4fd;p=dead%2Fwhatever-dl.git diff --git a/test/yikers_test.rb b/test/yikers_test.rb index 1c9548d..5b6f7f4 100644 --- a/test/yikers_test.rb +++ b/test/yikers_test.rb @@ -17,7 +17,7 @@ # require 'test/unit' -require 'src/websites/yikers' +require 'whatever-dl/websites/yikers' class YikersTest < Test::Unit::TestCase @@ -50,44 +50,9 @@ class YikersTest < Test::Unit::TestCase end - def test_parse_xml_path - yikers = Yikers.new(nil) - - page_data = nil - - File.open('test/fixtures/yikers/video_college_cafeteria_strip_off.html') do |f| - page_data = f.read - end - - test_result = yikers.send('parse_xml_path', page_data) - assert_equal('/flash/play_flash_xml.php?cid=11798', test_result) - end - - - def test_parse_video_url - yikers = Yikers.new(nil) - - page_data = nil - - File.open('test/fixtures/yikers/video_college_cafeteria_strip_off.xml') do |f| - page_data = f.read - end - - test_result = yikers.send('parse_video_url', page_data) - assert_equal('http://cdn.yikers.com/flv/flash8/yikers_college_cafeteria_strip_off.flv', test_result) - end - - def test_get_video_filename yikers = Yikers.new('http://www.yikers.com/video_college_cafeteria_strip_off.html') assert_equal('video_college_cafeteria_strip_off.flv', yikers.get_video_filename()) end - - - def test_uri_query_works_on_yikers_urls - uri = URI.parse('http://www.yikers.com/flash/play_flash_xml.php?cid=11798') - http_path = uri.path + '?' + uri.query - assert_equal('/flash/play_flash_xml.php?cid=11798', http_path) - end end