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/models/spam_log_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/models/spam_log_spec.rb')
-rw-r--r-- | spec/models/spam_log_spec.rb | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/spec/models/spam_log_spec.rb b/spec/models/spam_log_spec.rb index a40c7c5c892..564710b31d0 100644 --- a/spec/models/spam_log_spec.rb +++ b/spec/models/spam_log_spec.rb @@ -21,37 +21,18 @@ RSpec.describe SpamLog do end context 'when admin mode is enabled', :enable_admin_mode do - context 'when user_destroy_with_limited_execution_time_worker is enabled' do - it 'initiates user removal', :sidekiq_inline do - spam_log = build(:spam_log) - user = spam_log.user - - perform_enqueued_jobs do - spam_log.remove_user(deleted_by: admin) - end - - expect( - Users::GhostUserMigration.where(user: user, - initiator_user: admin) - ).to be_exists - end - end + it 'initiates user removal', :sidekiq_inline do + spam_log = build(:spam_log) + user = spam_log.user - 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) + perform_enqueued_jobs do + spam_log.remove_user(deleted_by: admin) end - it 'removes the user', :sidekiq_inline do - spam_log = build(:spam_log) - user = spam_log.user - - perform_enqueued_jobs do - spam_log.remove_user(deleted_by: admin) - end - - expect { User.find(user.id) }.to raise_error(ActiveRecord::RecordNotFound) - end + expect( + Users::GhostUserMigration.where(user: user, + initiator_user: admin) + ).to be_exists end end |