mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: API endpoint for inviting an admin
This commit is contained in:
parent
c139498235
commit
1c498eb491
3 changed files with 42 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue