Remove nil ApiCapability user branch

This commit is contained in:
Anton Khorev 2024-09-05 23:21:24 +03:00
parent ccc70fb914
commit e7fb89c8d0
2 changed files with 1 additions and 7 deletions

View file

@ -88,12 +88,6 @@ end
class UserApiCapabilityTest < ActiveSupport::TestCase
test "user preferences" do
# a user with no tokens
capability = ApiCapability.new nil
[:index, :show, :update_all, :update, :destroy].each do |act|
assert capability.cannot? act, UserPreference
end
# A user with empty tokens
token = create(:oauth_access_token)
capability = ApiCapability.new token