Sha256: 7f4e397a5ec491500b3eb98fa9c7336ffd556a1bc054537c7dc257fe7ad35943

Contents?: true

Size: 753 Bytes

Versions: 4

Compression:

Stored size: 753 Bytes

Contents

include Warden::Test::Helpers
Warden.test_mode!

# Feature: User delete
#   As a user
#   I want to delete my user profile
#   So I can close my account
feature 'User delete', :devise, :js do

  after(:each) do
    Warden.test_reset!
  end

  # Scenario: User can delete own account
  #   Given I am signed in
  #   When I delete my account
  #   Then I should see an account deleted message
  scenario 'user can delete own account' do
    skip 'skip a slow test'
    user = FactoryGirl.create(:user)
    login_as(user, :scope => :user)
    visit edit_user_registration_path(user)
    click_button 'Cancel my account'
    page.driver.browser.switch_to.alert.accept
    expect(page).to have_content I18n.t 'devise.registrations.destroyed'
  end

end




Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_apps_testing-0.3.12 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.11 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.10 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.9 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb