Sha256: 51bb3ac25862831496782bdcd6f8745f53108f6c8aec0d060cc04758a7678885

Contents?: true

Size: 878 Bytes

Versions: 17

Compression:

Stored size: 878 Bytes

Contents

require 'rails_helper'

feature 'user signs out', %Q{
  As an authenticated user
  I want to sign out
  So that my identity is forgotten about on the machine I'm using
} do
  # Acceptance Criteria
  # * If I'm signed in, I have an option to sign out
  # * When I opt to sign out, I get a confirmation that my identity has been
  #   forgotten on the machine I'm using

  scenario 'authenticated user signs out' do
    user = FactoryBot.create(:user)

    visit new_user_session_path

    fill_in 'Email', with: user.email
    fill_in 'Password', with: user.password

    click_button 'Log in'

    expect(page).to have_content('Signed in successfully')

    click_link 'Sign Out'
    expect(page).to have_content('Signed out successfully')
  end

  scenario 'unauthenticated user attempts to sign out' do
    visit '/'
    expect(page).to_not have_content('Sign Out')
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
make_it_so-0.6.0 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.5.1 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.5.0 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.4.5 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.4.3 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.4.2 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.4.1 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.4.0 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.3.8 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.3.7 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.3.6 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.3.5 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.3.4 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.2.4 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.2.3 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.1.4 templates/rails/spec/features/user_signs_out_spec.rb
make_it_so-0.1.3 templates/rails/spec/features/user_signs_out_spec.rb