Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/spam_log_spec.rb')
-rw-r--r--spec/models/spam_log_spec.rb37
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