mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Adds test case for logging out
This commit is contained in:
@@ -26,4 +26,18 @@ describe "Authentication" do
|
||||
click_link "Account"
|
||||
expect(page).to have_current_path spree.account_path
|
||||
end
|
||||
|
||||
context "logged in" do
|
||||
before do
|
||||
login_as user
|
||||
visit root_path
|
||||
end
|
||||
|
||||
it "logs out" do
|
||||
page.find("li", class: "user-menu").click
|
||||
click_on "Logout"
|
||||
expect(page).to have_content "Signed out successfully."
|
||||
expect(page).to have_content "Login"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user