2019-09-04 21:01:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe GitlabSchema.types['Note'] do
|
|
|
|
it 'exposes the expected fields' do
|
|
|
|
expected_fields = [:id, :project, :author, :body, :created_at,
|
|
|
|
:updated_at, :discussion, :resolvable, :position, :user_permissions,
|
2020-04-22 19:07:51 +05:30
|
|
|
:resolved_by, :resolved_at, :system, :body_html, :confidential]
|
2019-09-04 21:01:54 +05:30
|
|
|
|
2020-04-22 19:07:51 +05:30
|
|
|
expect(described_class).to have_graphql_fields(*expected_fields)
|
2019-09-04 21:01:54 +05:30
|
|
|
end
|
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
specify { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Note) }
|
|
|
|
specify { expect(described_class).to require_graphql_authorizations(:read_note) }
|
2019-09-04 21:01:54 +05:30
|
|
|
end
|