Sha256: b91805265f4739c87c941fdbc49fdb13430e35f50afdf08aa37bb270527a2685
Contents?: true
Size: 739 Bytes
Versions: 11
Compression:
Stored size: 739 Bytes
Contents
require 'helper' describe Bearcat::Client::Accounts do before do @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token") end it "returns a single account" do stub_get(@client, "/api/v1/accounts/1").to_return(json_response("single_account.json")) account = @client.account(1) account["id"].should == 1 account["name"].should == "Local Testing" end it "returns enrollment terms for an account" do stub_get(@client, "/api/v1/accounts/1/terms").to_return(json_response("enrollment_terms.json")) account = @client.terms(1) terms = account.members terms.count.should == 1 terms.first['id'].should == 4 terms.first['name'].should == 'Term 1' end end
Version data entries
11 entries across 11 versions & 1 rubygems