Sha256: 49d297cc31ea524a92dc6776065c915817d1c2adb0d1b01ede53e52b4614be27

Contents?: true

Size: 792 Bytes

Versions: 10

Compression:

Stored size: 792 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 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
  end

end




Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
rails_apps_testing-0.3.8 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.7 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.6 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.5 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.4 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.3 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.2 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.1 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_testing-0.3.0 lib/generators/testing/configure/templates/spec/devise/features/users/user_delete_spec.rb
rails_apps_pages-0.4.9 lib/generators/pages/users/templates/spec/features/users/user_delete_spec.rb