debian-mirror-gitlab/spec/graphql/types/notes/note_type_spec.rb

34 lines
720 B
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
2020-06-23 00:09:42 +05:30
2019-09-04 21:01:54 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe GitlabSchema.types['Note'] do
2019-09-04 21:01:54 +05:30
it 'exposes the expected fields' do
2020-06-23 00:09:42 +05:30
expected_fields = %i[
author
body
body_html
confidential
created_at
discussion
id
position
project
resolvable
resolved
resolved_at
resolved_by
system
2020-07-28 23:09:34 +05:30
system_note_icon_name
2020-06-23 00:09:42 +05:30
updated_at
user_permissions
2021-03-08 18:12:59 +05:30
url
2020-06-23 00:09:42 +05:30
]
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