openstreetmap-website/test/system/user_suspension_test.rb
Andy Allan 4bed9c12a0 Fix display of suspension message when a user is suspended mid-session
Without the ability defined, the user is still logged out, but then
the deny_access check redirects to the login page. The re-login attempt
would then fail anyway, with an error message, but let's fix the abilities
and use the intended page.
2022-01-05 18:21:42 +00:00

15 lines
420 B
Ruby

require "application_system_test_case"
class UserSuspensionTest < ApplicationSystemTestCase
test "User shown a message when suspended mid-session" do
user = create(:user)
sign_in_as(user)
visit edit_account_path
assert_content "My Settings"
user.update(:status => "suspended")
visit edit_account_path
assert_content "This decision will be reviewed by an administrator shortly"
end
end