# frozen_string_literal: true
require 'test_helper'

class AdminControllerTest < ActionDispatch::IntegrationTest
  test 'should provide flash mesage when access is denied' do
    auth_reviewer
    get admin_candidates_path

    assert_redirected_to admin_login_path
    assert_match 'not authorized', flash[:error]
  end

  test 'sort_column present' do
    # a stupid coverage report thing.
    admin_controller = AdminController.new

    assert_equal :completed_at, admin_controller.send(:sort_column)
  end
end
