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