Skip to content

Instantly share code, notes, and snippets.

@domagude

domagude/logout_spec.rb

Last active Oct 20, 2017
Embed
What would you like to do?
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