spec/bearcat/client/accounts_spec.rb in bearcat-1.0.21 vs spec/bearcat/client/accounts_spec.rb in bearcat-1.0.22

- old
+ new

@@ -34,6 +34,17 @@ terms.count.should == 1 terms.first['id'].should == 4 terms.first['name'].should == 'Term 1' end + it "returns the roles for an account" do + stub_get(@client, "/api/v1/accounts/1/roles").to_return(json_response("account_roles.json")) + account = @client.account_roles(1) + roles = account.members + roles.count.should == 1 + roles.first['id'].should == 1 + roles.first['role'].should == 'AccountAdmin' + roles.first['permissions'].count.should == 4 + roles.first['permissions']['manage_catalog']['enabled'].should == true + end + end