1 require "application_system_test_case"
3 class UserLogoutTest < ApplicationSystemTestCase
4 test "Sign out via link" do
7 assert_no_content "Log In"
9 click_button user.display_name
11 assert_content "Log In"
14 test "Sign out via link with referer" do
18 assert_no_content "Log In"
20 click_button user.display_name
22 assert_content "Log In"
23 assert_content "Public GPS Traces"
26 test "Sign out via fallback page" do
27 sign_in_as(create(:user))
28 assert_no_content "Log In"
31 assert_content "Logout from OpenStreetMap"
34 assert_content "Log In"
37 test "Sign out via fallback page with referer" do
38 sign_in_as(create(:user))
39 assert_no_content "Log In"
41 visit logout_path(:referer => "/traces")
42 assert_content "Logout from OpenStreetMap"
45 assert_content "Log In"
46 assert_content "Public GPS Traces"