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/features/profile_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
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 |