spec/bearcat/client/accounts_spec.rb in bearcat-1.3.15 vs spec/bearcat/client/accounts_spec.rb in bearcat-1.3.16
- old
+ new
@@ -18,9 +18,17 @@
account_admins.count.should == 4
account_admins.first['id'].should == 3
account_admins.last['role'].should == 'Custom Admin'
end
+ it 'returns a list of all sub-accounts' do
+ stub_get(@client, "/api/v1/accounts/1/sub_accounts").to_return(json_response("account_sub_accounts.json"))
+ account_sub_accounts = @client.list_sub_accounts(1)
+ account_sub_accounts.count.should == 1
+ account_sub_accounts.first['id'].should == 2
+ account_sub_accounts.first['name'].should == "Manually-Created Courses"
+ 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"