Add reason
param to POST /api/v1/accounts
REST API (#12064)
For approval-required registrations mode
This commit is contained in:
parent
9a1be333b8
commit
eb83d6256e
3 changed files with 14 additions and 4 deletions
|
@ -38,6 +38,15 @@ RSpec.describe AppSignUpService, type: :service do
|
|||
user = User.find_by(id: access_token.resource_owner_id)
|
||||
expect(user).to_not be_nil
|
||||
expect(user.account).to_not be_nil
|
||||
expect(user.invite_request).to be_nil
|
||||
end
|
||||
|
||||
it 'creates an account with invite request text' do
|
||||
access_token = subject.call(app, good_params.merge(reason: 'Foo bar'))
|
||||
expect(access_token).to_not be_nil
|
||||
user = User.find_by(id: access_token.resource_owner_id)
|
||||
expect(user).to_not be_nil
|
||||
expect(user.invite_request&.text).to eq 'Foo bar'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue