Sha256: f5b4add542798c819b7c505081d3bbde10015913d943aec9336d695f7b3fce33
Contents?: true
Size: 675 Bytes
Versions: 1
Compression:
Stored size: 675 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")) terms = @client.terms(1).first terms['id'].should == 4 terms['name'].should == 'Term 1' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bearcat-1.0.3 | spec/bearcat/client/accounts_spec.rb |