diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/services/resource_access_tokens/revoke_service_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/services/resource_access_tokens/revoke_service_spec.rb')
-rw-r--r-- | spec/services/resource_access_tokens/revoke_service_spec.rb | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/spec/services/resource_access_tokens/revoke_service_spec.rb b/spec/services/resource_access_tokens/revoke_service_spec.rb index 8f89696cc55..28f173f1bc7 100644 --- a/spec/services/resource_access_tokens/revoke_service_spec.rb +++ b/spec/services/resource_access_tokens/revoke_service_spec.rb @@ -29,35 +29,13 @@ RSpec.describe ResourceAccessTokens::RevokeService do expect(resource.reload.users).not_to include(resource_bot) end - context 'when user_destroy_with_limited_execution_time_worker is enabled' do - it 'initiates user removal' do - subject - - expect( - Users::GhostUserMigration.where(user: resource_bot, - initiator_user: user) - ).to be_exists - end - end - - context 'when user_destroy_with_limited_execution_time_worker is disabled' do - before do - stub_feature_flags(user_destroy_with_limited_execution_time_worker: false) - end - - it 'transfer issuables of bot user to ghost user' do - issue = create(:issue, author: resource_bot) - - subject - - expect(issue.reload.author.ghost?).to be true - end - - it 'deletes project bot user' do - subject + it 'initiates user removal' do + subject - expect(User.exists?(resource_bot.id)).to be_falsy - end + expect( + Users::GhostUserMigration.where(user: resource_bot, + initiator_user: user) + ).to be_exists end it 'logs the event' do |