tabletop-companion/test/integration/permissions_test.rb

14 lines
300 B
Ruby
Raw Normal View History

2024-05-26 10:45:10 +00:00
# frozen_string_literal: true
2024-05-26 09:06:04 +00:00
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