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.
This commit is contained in:
Bob Van Landuyt 2019-04-01 10:55:33 +02:00
parent 093629fedc
commit e756dca0c5
2 changed files with 6 additions and 2 deletions

View File

@ -7,6 +7,8 @@ describe Types::PermissionTypes::Issue do
: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

View File

@ -13,6 +13,8 @@ describe Types::PermissionTypes::Project do
: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