it'adds an offense when there is no authorize call'do
inspect_source(<<~TYPE)
expect_offense(<<~TYPE)
module Types
class AType < BaseObject
^^^^^^^^^^^^^^^^^^^^^^^^ Add an `authorize :ability` call to the type: https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#type-authorization
field :a_thing
field :another_thing
end
end
TYPE
expect(cop.offenses.size).toeq1
end
it'does not add an offense for classes that have an authorize call'do