diff --git a/spec/features/account_spec.rb b/spec/features/account_spec.rb index e0249072c..029864ec9 100644 --- a/spec/features/account_spec.rb +++ b/spec/features/account_spec.rb @@ -81,4 +81,20 @@ feature 'Account' do expect(page).to have_content error_message end + + scenario 'Erasing account' do + visit account_path + + click_link 'Erase my account' + + fill_in 'user_erase_reason', with: 'a test' + + click_button 'Erase my account' + + expect(page).to have_content "Your account has been successfully cancelled" + + login_through_form_as(@user) + + expect(page).to have_content "Invalid email or password" + end end