]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blob - test/infoq_test.rb
51d1a3fb7f25a02563f0a2cb7432f170c7536ac8
[dead/whatever-dl.git] / test / infoq_test.rb
1 # Unit tests for the Infoq class. Basically just checking
2 # the results of parse_video_url for now.
3
4 require 'test/unit'
5 require 'src/websites/infoq'
6
7 class InfoqTest < Test::Unit::TestCase
8
9 def test_owns_infoq_urls
10 assert(Infoq.owns_url?('http://www.infoq.com/interviews/jim-weirich-discusses-rake'))
11 end
12
13
14 def test_parse_video_url
15 iq = Infoq.new()
16
17 page_data = nil
18
19 File.open('test/fixtures/infoq/jim-weirich-discusses-rake.html') do |f|
20 page_data = f.read
21 end
22
23 test_result = iq.send('parse_video_url', page_data)
24 assert_equal('http://flv.thruhere.net/interviews/JimWeirich.flv', test_result)
25 end
26
27 end