diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 07:53:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 07:53:40 +0000 |
commit | cfc792b9ca064990e6540cb742e80529ea669a81 (patch) | |
tree | 147cd4256319990cebbc02fe8e4fbbbe06f5720a /spec/graphql/types/snippet_type_spec.rb | |
parent | 93c6764dacd4c605027ef1cd367d3aebe420b223 (diff) | |
download | gitlab-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.rb | 19 |
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 |