debian-mirror-gitlab/spec/graphql/types/snippet_type_spec.rb
2020-01-01 13:55:28 +05:30

20 lines
627 B
Ruby

# 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,
:visibility_level, :created_at, :updated_at,
: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