FEATURE: API endpoint for inviting an admin

This commit is contained in:
Sam
2014-11-24 15:42:39 +11:00
parent c139498235
commit 1c498eb491
3 changed files with 42 additions and 0 deletions

View File

@ -427,6 +427,18 @@ describe Admin::UsersController do
end
context ".invite_admin" do
it 'should invite admin' do
xhr :post, :invite_admin, name: 'Bill', username: 'bill22', email: 'bill@bill.com'
response.should be_success
u = User.find_by(email: 'bill@bill.com')
u.name.should == "Bill"
u.username.should == "bill22"
u.admin.should == true
end
end
end
it 'can sync up sso' do