chore: Removing duplicate callback to create auth token (#2624)

Removed after create callback in user model to create a new access token. This is already being taken care of by AccessTokenable module.

Fixes #2620
This commit is contained in:
Mrunal Selokar
2021-07-15 15:24:38 +05:30
committed by GitHub
parent b56512eb56
commit e0535168a0
4 changed files with 21 additions and 2 deletions

View File

@@ -72,4 +72,12 @@ RSpec.describe User do
expect(user.valid_sso_auth_token?(sso_auth_token)).to eq false
end
end
describe 'access token' do
it 'creates a single access token upon user creation' do
new_user = create(:user)
token_count = AccessToken.where(owner: new_user).count
expect(token_count).to eq(1)
end
end
end