I am writing a test to confirm the user account is deleted after the user inputs the correct password.

The form I am testing:

```rb
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :delete }) do |f| %>
  <%= f.label :password %>Enter your password to delete your account.<br />
  <%= f.password_field :password_to_delete %><br />
  <button type="submit", data-test="delete-user-account">Delete my account</button>
<% end %>

```

([I can confirm the action works](https://stackoverflow.com/questions/60454812/destroy-with-password-always-returns-false), but the test does not.)

This is my current test:

```rb
RSpec.feature 'user deletes account' do
  let(:user) { create :user }

  # when user puts in correct password and successfully deletes
  context 'when successful' do
    scenario 'user inputs correct password' do
      visit new_user_session_path
      fill_in 'user_email', with: user.email
      fill_in 'user_password', with: '123456'
      find('[data-test="submit"]').click
      visit edit_user_registration_path
      fill_in 'user_password_to_delete', with: '123456'

      find('[data-test="delete-user-account"]').click

      expect(user).not_to be_present
    end
  end
end

```

What gets returned:

```rb
Failures:

  1) user deletes account when successful user inputs correct password
     Failure/Error: expect(user).not_to be_present
       expected `#<User id: 1>.present?` to return false, got true

```