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