tabletop-companion/test/integration/permissions_test.rb

12 lines
269 B
Ruby

require "test_helper"
class PermissionsTest < ActionDispatch::IntegrationTest
test "admin? returns true for users with an admin role" do
user = users(:trevor)
assert_not user.admin?
user.site_roles << site_roles(:admin)
assert user.admin?
end
end