spec/bearcat/client/accounts_spec.rb in bearcat-1.3.6 vs spec/bearcat/client/accounts_spec.rb in bearcat-1.3.7
- old
+ new
@@ -60,6 +60,20 @@
grading_standards = @client.account_grading_standards(1)
expect(grading_standards['id']).to eq 1
expect(grading_standards['title']).to eq 'account grading scheme'
end
+ it 'creates an account admin' do
+ stub_post(@client, "/api/v1/accounts/1/admins").to_return(json_response("account_admin_create.json"))
+ account_admin = @client.create_account_admin(1, {role_id:1, user_id: "sis_user_id:user1_sis_id"})
+ expect(account_admin['id']).to eq 99
+ expect(account_admin['role']).to eq 'AccountAdmin'
+ end
+
+ it 'deletes an account admin' do
+ stub_delete(@client, "/api/v1/accounts/1/admins/sis_user_id:user1_sis_id?role_id=1").to_return(json_response("account_admin_delete.json"))
+ account_admin = @client.delete_account_admin(1, "sis_user_id:user1_sis_id", {role_id:1})
+ expect(account_admin['id']).to eq 99
+ expect(account_admin['status']).to eq 'deleted'
+ end
+
end