summaryrefslogtreecommitdiff
path: root/spec/graphql/types/snippet_type_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 07:53:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 07:53:40 +0000
commitcfc792b9ca064990e6540cb742e80529ea669a81 (patch)
tree147cd4256319990cebbc02fe8e4fbbbe06f5720a /spec/graphql/types/snippet_type_spec.rb
parent93c6764dacd4c605027ef1cd367d3aebe420b223 (diff)
downloadgitlab-ce-cfc792b9ca064990e6540cb742e80529ea669a81.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql/types/snippet_type_spec.rb')
-rw-r--r--spec/graphql/types/snippet_type_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/graphql/types/snippet_type_spec.rb b/spec/graphql/types/snippet_type_spec.rb
new file mode 100644
index 00000000000..3c3250a5fa2
--- /dev/null
+++ b/spec/graphql/types/snippet_type_spec.rb
@@ -0,0 +1,19 @@
+# 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, :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