Commit 1e297340 authored by Sean Arnold's avatar Sean Arnold

Change style of conditional

parent 4427d99d
......@@ -2,9 +2,11 @@
RSpec::Matchers.define :require_graphql_authorizations do |*expected|
match do |klass|
permissions = klass.respond_to?(:required_permissions) ?
klass.required_permissions :
permissions = if klass.respond_to?(:required_permissions)
klass.required_permissions
else
[klass.to_graphql.metadata[:authorize]]
end
expect(permissions).to eq(expected)
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