X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/73c95847a6680bea7f35fe5b3da6eb4e52757b9c..c12f8959dd2059b4ea9d45caf716923d7589cbb0:/test/system/user_logout_test.rb?ds=inline diff --git a/test/system/user_logout_test.rb b/test/system/user_logout_test.rb index 099d2c0c0..fc27b7c18 100644 --- a/test/system/user_logout_test.rb +++ b/test/system/user_logout_test.rb @@ -4,45 +4,45 @@ class UserLogoutTest < ApplicationSystemTestCase test "Sign out via link" do user = create(:user) sign_in_as(user) - assert_not page.has_content? "Log In" + assert_no_content "Log In" - click_on user.display_name - click_on "Log Out" - assert page.has_content? "Log In" + click_button user.display_name + click_link "Log Out" + assert_content "Log In" end test "Sign out via link with referer" do user = create(:user) sign_in_as(user) visit traces_path - assert_not page.has_content? "Log In" + assert_no_content "Log In" - click_on user.display_name - click_on "Log Out" - assert page.has_content? "Log In" - assert page.has_content? "Public GPS traces" + click_button user.display_name + click_link "Log Out" + assert_content "Log In" + assert_content "Public GPS Traces" end test "Sign out via fallback page" do sign_in_as(create(:user)) - assert_not page.has_content? "Log In" + assert_no_content "Log In" visit logout_path - assert page.has_content? "Logout from OpenStreetMap" + assert_content "Logout from OpenStreetMap" click_button "Logout" - assert page.has_content? "Log In" + assert_content "Log In" end test "Sign out via fallback page with referer" do sign_in_as(create(:user)) - assert_not page.has_content? "Log In" + assert_no_content "Log In" visit logout_path(:referer => "/traces") - assert page.has_content? "Logout from OpenStreetMap" + assert_content "Logout from OpenStreetMap" click_button "Logout" - assert page.has_content? "Log In" - assert page.has_content? "Public GPS traces" + assert_content "Log In" + assert_content "Public GPS Traces" end end