]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blob - test/infoq_remote_test.rb
Added the Infoq site.
[dead/whatever-dl.git] / test / infoq_remote_test.rb
1 # Remote Infoq tests. Actually hit their website
2 # and attempt to parse the data returned.
3
4 require 'test/unit'
5 require 'src/websites/infoq'
6
7 class InfoqRemoteTest < Test::Unit::TestCase
8
9 def test_get_page_data
10 iq = Infoq.new()
11
12 # We can't rely on the fixture here, because Infoq might
13 # change their page layout. Instead, check that we can actually
14 # find the base64 regex (containing the FLV URL).
15 page_data = iq.send('get_page_data', 'http://www.infoq.com/interviews/jim-weirich-discusses-rake')
16
17 test_result = iq.get_video_url(page_data)
18 assert_equal('http://flv.thruhere.net/interviews/JimWeirich.flv', test_result)
19 end
20
21 end