Commit e756dca0 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Extra permissions in Project & Issue GraphQL

Allow extra permissions for the `Types::ProjectType` and
`Types:IssueType` GraphQL types. As we'll be adding more permissions
in CE.

Now this spec only validates if all the expected permissions are
present, but it will not fail if there are more.
parent 093629fe
...@@ -7,6 +7,8 @@ describe Types::PermissionTypes::Issue do ...@@ -7,6 +7,8 @@ describe Types::PermissionTypes::Issue do
:create_note, :reopen_issue :create_note, :reopen_issue
] ]
expect(described_class).to have_graphql_fields(expected_permissions) expected_permissions.each do |permission|
expect(described_class).to have_graphql_field(permission)
end
end end
end end
...@@ -13,6 +13,8 @@ describe Types::PermissionTypes::Project do ...@@ -13,6 +13,8 @@ describe Types::PermissionTypes::Project do
:update_wiki, :destroy_wiki, :create_pages, :destroy_pages, :read_pages_content :update_wiki, :destroy_wiki, :create_pages, :destroy_pages, :read_pages_content
] ]
expect(described_class).to have_graphql_fields(expected_permissions) expected_permissions.each do |permission|
expect(described_class).to have_graphql_field(permission)
end
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