X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=test%2Fyikers_test.rb;fp=test%2Fyikers_test.rb;h=7bb8150d74f8d3a9a6ac8edc07295c84777b32d2;hp=1c9548d2043061cd4377b379cead5d98336b3e94;hb=5185d100c0406dab1f9013e5b0e86289558225e9;hpb=85a93745e73d0dda38b450074b54475f74671577 diff --git a/test/yikers_test.rb b/test/yikers_test.rb index 1c9548d..7bb8150 100644 --- a/test/yikers_test.rb +++ b/test/yikers_test.rb @@ -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