Commit 7b197fde authored by Sean Arnold's avatar Sean Arnold

Update Graphql matcher to support mutations

parent 58d207af
# frozen_string_literal: true # frozen_string_literal: true
RSpec::Matchers.define :require_graphql_authorizations do |*expected| RSpec::Matchers.define :require_graphql_authorizations do |*expected|
match do |field| match do |klass|
expect(field.to_graphql.metadata[:authorize]).to eq(*expected) permissions = klass.respond_to?(:required_permissions) ?
klass.required_permissions :
[klass.to_graphql.metadata[:authorize]]
expect(permissions).to eq(expected)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment