Sha256: e48c6fc3e08eb2c5001e8f4a3397e6b87f40742622d9bb96d0f0e20e8a3910a5
Contents?: true
Size: 747 Bytes
Versions: 16
Compression:
Stored size: 747 Bytes
Contents
require 'helper' describe Bearcat::Client::ModuleItems do before do @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token") end it 'returns all items for a module' do stub_get(@client, '/api/v1/courses/1/modules/1/items').to_return(json_response('module_items.json')) items = @client.list_module_items(1,1) items.count.should == 3 items.members[0]['id'].should == 1358 items.members[0]['type'].should == 'Page' end describe '#module_item' do it 'returns a module' do stub_get(@client, '/api/v1/courses/1/modules/1/items/2').to_return(json_response('module_item.json')) item = @client.module_item(1, 1, 2) expect(item['id']).to eq(2) end end end
Version data entries
16 entries across 16 versions & 1 rubygems