diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-08 03:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-08 03:10:26 +0300 |
commit | 9695fcf51937fbba91c8bf9ea076ba376fe2a4b1 (patch) | |
tree | 55b2c576e10348a2317da6cdf4e38af1dc16fb64 /spec/features/profile_spec.rb | |
parent | 364e69bafd235e5689fba44bb5eef37305cb6c6d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/profile_spec.rb')
-rw-r--r-- | spec/features/profile_spec.rb | 41 |
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 |