21 lines
567 B
Ruby
21 lines
567 B
Ruby
|
require "test_helper"
|
||
|
|
||
|
class AdminGameSystemsControllerTest < ActionDispatch::IntegrationTest
|
||
|
test "should get game systems index if signed in as admin" do
|
||
|
sign_in users(:admin)
|
||
|
get admin_game_systems_path
|
||
|
assert_response :success
|
||
|
end
|
||
|
|
||
|
test "should not get game systems index if signed in as non-admin user" do
|
||
|
sign_in users(:trevor)
|
||
|
get admin_game_systems_path
|
||
|
assert_response :forbidden
|
||
|
end
|
||
|
|
||
|
test "should not get game systems index if not signed in" do
|
||
|
get admin_game_systems_path
|
||
|
assert_redirected_to login_path
|
||
|
end
|
||
|
end
|