require 'test_helper'
 
class UserSuspensionTest < ActionDispatch::IntegrationTest
  setup do
    @user = create(:user)
    @user.suspend("gross misconduct")
  end

  should "prevent users from signing in" do
    visit new_user_session_path
    signin(@user)

    assert_response_contains("account has been temporarily suspended")
  end

  should "show the suspension reason to admins" do
    admin = create(:user, role: 'admin')
    visit new_user_session_path
    signin(admin)

    visit edit_admin_user_path(@user)
    assert_response_contains("gross misconduct")
  end
end

require 'test_helper'
 
class UserSuspensionTest < ActionDispatch::IntegrationTest
  setup do
    @user = create(:user)
    @user.suspend("gross misconduct")
  end

  should "prevent users from signing in" do
    visit new_user_session_path
    signin(@user)

    assert_response_contains("account has been suspended")
  end

  should "show the suspension reason to admins" do
    admin = create(:user, role: 'admin')
    visit new_user_session_path
    signin(admin)

    visit edit_admin_user_path(@user)
    assert_response_contains("gross misconduct")
  end
end

Update test for change to suspension message
Update test for change to suspension message

Update the test for the change made to the suspension message made in https://github.com/alphagov/signonotron2/commit/68514ef43b71f5e645c597d3b2f3202cf207c732