2016-09-08 10:25:33 -05:00
|
|
|
# frozen_string_literal: true
|
2016-08-17 17:49:09 -05:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class AdminControllerTest < ActionDispatch::IntegrationTest
|
2016-09-22 17:26:00 -05:00
|
|
|
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
|
2016-08-17 17:49:09 -05:00
|
|
|
end
|