Skip to content

Instantly share code, notes, and snippets.

@domagude
Last active October 20, 2017 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domagude/1eea8b18edf7ec2d94fa083a8df1600f to your computer and use it in GitHub Desktop.
Save domagude/1eea8b18edf7ec2d94fa083a8df1600f to your computer and use it in GitHub Desktop.
require "rails_helper"
RSpec.feature "Logout", :type => :feature do
let(:user) { create(:user) }
scenario 'user successfully logs out', js: true do
sign_in user
visit root_path
find('nav #user-settings').click
find('nav a', text: 'Log out').click
expect(page).to have_selector('nav a', text: 'Login')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment