X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=blobdiff_plain;f=test%2Fhowcast_test.rb;h=aacfcf2d65b670299d66a66188a3a2e4cf2ae868;hp=a76c725689f01259f3219ca1cc9a0ce48e787b25;hb=7fa3c93d0b469896d3681318031601c5de3341b8;hpb=c292aca3372339f92ea6fa8fa563ffed7f4fd19c diff --git a/test/howcast_test.rb b/test/howcast_test.rb index a76c725..aacfcf2 100644 --- a/test/howcast_test.rb +++ b/test/howcast_test.rb @@ -42,7 +42,23 @@ class HowcastTest < Test::Unit::TestCase assert(!Howcast.owns_url?('redtube.com/6807')) end + def test_doesnt_own_misc_urls assert(!Howcast.owns_url?('http://www.howcast.com/abc')) end + + + def test_parse_file_path_from_xml + hc = Howcast.new(nil) + + page_data = nil + + File.open('test/fixtures/howcast/81134.xml') do |f| + page_data = f.read + end + + test_result = hc.send('parse_file_path_from_xml', page_data) + assert_equal('/system/videos/4/34/11/08/81134.flv', test_result) + end + end