Sha256: 7e3529fc43ac559c76e5fc0fcbcd1c993665fe3f955a6545c78d4552fe995cb0
Contents?: true
Size: 736 Bytes
Versions: 5
Compression:
Stored size: 736 Bytes
Contents
require 'helper' describe Bearcat::Client::Groups do before do @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token") end it "returns course groups" do stub_get(@client, "/api/v1/courses/1/groups").to_return(json_response("course_groups.json")) groups = @client.course_groups(1) groups.count.should == 2 groups.first['name'].should == 'group 1' groups.last['id'].should == 4 end it "returns account groups" do stub_get(@client, "/api/v1/accounts/1/groups").to_return(json_response("account_groups.json")) groups = @client.account_groups(1) groups.count.should == 2 groups.first['name'].should == '2010' groups.last['id'].should == 3 end end
Version data entries
5 entries across 5 versions & 1 rubygems