2019-12-10 07:53:40 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe GitlabSchema.types['Snippet'] do
|
|
|
|
it 'has the correct fields' do
|
|
|
|
expected_fields = [:id, :title, :project, :author,
|
|
|
|
:file_name, :content, :description,
|
2019-12-13 09:08:01 +00:00
|
|
|
:visibility_level, :created_at, :updated_at,
|
2019-12-10 07:53:40 +00:00
|
|
|
:web_url, :raw_url, :notes, :discussions,
|
|
|
|
:user_permissions, :description_html]
|
|
|
|
|
|
|
|
is_expected.to have_graphql_fields(*expected_fields)
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'authorizations' do
|
|
|
|
it { expect(described_class).to require_graphql_authorizations(:read_snippet) }
|
|
|
|
end
|
|
|
|
end
|