test/test_brightcove-api.rb in brightcove-api-1.0.10 vs test/test_brightcove-api.rb in brightcove-api-1.0.11

- old
+ new

@@ -10,11 +10,11 @@ def teardown FakeWeb.allow_net_connect = true end def test_api_version - assert_equal '1.0.10', Brightcove::API::VERSION + assert_equal '1.0.11', Brightcove::API::VERSION end def test_can_set_read_api_url brightcove = Brightcove::API.new('apikeytoken') @@ -64,9 +64,21 @@ brightcove = Brightcove::API.new('0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.') brightcove_response = brightcove.get('find_all_videos', {:page_size => 5}) assert_equal 5, brightcove_response['items'].size assert_equal 0, brightcove_response['page_number'] + end + + def test_find_all_videos_mrss + FakeWeb.register_uri(:get, + 'http://api.brightcove.com/services/library?command=find_all_videos&format=xml&output=mrss&token=0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.', + :body => File.join(File.dirname(__FILE__), 'fakeweb', 'find_all_videos_response.xml'), + :content_type => "application/xml") + + brightcove = Brightcove::API.new('0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.') + brightcove_response = brightcove.get('find_all_videos', {:output => 'mrss'}) + + assert_equal 85, brightcove_response['rss']['channel']['item'].size end def test_search_with_array_params brightcove = Brightcove::API.new('0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.') brightcove.class.expects(:get).with(anything, has_entry(:query => {