diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb index db7d0e342..835321c6a 100644 --- a/spec/features/user_spec.rb +++ b/spec/features/user_spec.rb @@ -31,7 +31,17 @@ RSpec.describe "User Features" do expect(page).to have_current_path("/logs") end - it " can log out again" do + it " can log out again", js: true do + visit("/logs") + fill_in("user[email]", with: user.email) + fill_in("user[password]", with: "pAssword1") + click_button("Sign in") + click_link("Sign out") + expect(page).to have_current_path("/") + expect(page).to have_content("Start now") + end + + it " can log out again with js disabled" do visit("/logs") fill_in("user[email]", with: user.email) fill_in("user[password]", with: "pAssword1")