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/features/profile_spec.rb')
-rw-r--r--spec/features/profile_spec.rb41
1 files changed, 10 insertions, 31 deletions
diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb
index 913c375f909..ca156642bc8 100644
--- a/spec/features/profile_spec.rb
+++ b/spec/features/profile_spec.rb
@@ -27,41 +27,20 @@ RSpec.describe 'Profile account page', :js do
expect(User.exists?(user.id)).to be_truthy
end
- context 'when user_destroy_with_limited_execution_time_worker is enabled' do
- it 'deletes user', :js, :sidekiq_inline do
- click_button 'Delete account'
-
- fill_in 'password', with: user.password
+ it 'deletes user', :js, :sidekiq_inline do
+ click_button 'Delete account'
- page.within '.modal' do
- click_button 'Delete account'
- end
+ fill_in 'password', with: user.password
- expect(page).to have_content('Account scheduled for removal')
- expect(
- Users::GhostUserMigration.where(user: user,
- 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 'deletes user', :js, :sidekiq_inline do
+ page.within '.modal' do
click_button 'Delete account'
-
- fill_in 'password', with: user.password
-
- page.within '.modal' do
- click_button 'Delete account'
- end
-
- expect(page).to have_content('Account scheduled for removal')
- expect(User.exists?(user.id)).to be_falsy
end
+
+ expect(page).to have_content('Account scheduled for removal')
+ expect(
+ Users::GhostUserMigration.where(user: user,
+ initiator_user: user)
+ ).to be_exists
end
it 'shows invalid password flash message', :js do