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:
parent
093629fedc
commit
e756dca0c5
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue