]>
gitweb.michael.orlitzky.com - dead/whatever-dl.git/blob - test/veoh_test.rb
2 require 'src/websites/veoh'
4 class VeohTest
< Test
::Unit::TestCase
6 def test_parse_video_id
8 video_id
= v
.send('parse_video_id', 'http://www.veoh.com/videos/v801204yMZ8BWcC')
9 assert_equal('v801204yMZ8BWcC', video_id
)
13 def test_parse_redirect_url
18 File
.open('test/fixtures/veoh/details_data-v801204yMZ8BWcC.xml') do |f
|
22 actual_result
= v
.send('parse_redirect_url', details_data
)
23 expected_result
= 'http://content.veoh.com/flash/p/801204/7b55b0e3fef09c5599ba2ab3d6a270c3dc9c0a0d.flv?ct=8c18f78c97a2df5cb5f7d849dce97c28996b0835dfc71ce9'
25 assert_equal(expected_result
, actual_result
)
29 def test_owns_veoh_urls
30 assert(Veoh
.owns_url
?('http://www.veoh.com/videos/v801204yMZ8BWcC'))