Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-22 15:08:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-22 15:08:40 +0300
commitbe3e24ea3c9f497efde85900df298ce9bc42fce8 (patch)
treefd0de9443253a1b21ca9a2741dc34ba3aef795be /spec/graphql
parent001243986195143c395a9811d8254bbf1b9ebfa1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r--spec/graphql/types/blob_viewers/type_enum_spec.rb11
-rw-r--r--spec/graphql/types/snippet_type_spec.rb4
-rw-r--r--spec/graphql/types/snippets/blob_type_spec.rb13
-rw-r--r--spec/graphql/types/snippets/blob_viewer_type_spec.rb12
4 files changed, 38 insertions, 2 deletions
diff --git a/spec/graphql/types/blob_viewers/type_enum_spec.rb b/spec/graphql/types/blob_viewers/type_enum_spec.rb
new file mode 100644
index 00000000000..7bd4352f388
--- /dev/null
+++ b/spec/graphql/types/blob_viewers/type_enum_spec.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe Types::BlobViewers::TypeEnum do
+ it { expect(described_class.graphql_name).to eq('BlobViewersType') }
+
+ it 'exposes all tree entry types' do
+ expect(described_class.values.keys).to include(*%w[rich simple auxiliary])
+ end
+end
diff --git a/spec/graphql/types/snippet_type_spec.rb b/spec/graphql/types/snippet_type_spec.rb
index 5524e7a415d..a06d372f668 100644
--- a/spec/graphql/types/snippet_type_spec.rb
+++ b/spec/graphql/types/snippet_type_spec.rb
@@ -5,10 +5,10 @@ require 'spec_helper'
describe GitlabSchema.types['Snippet'] do
it 'has the correct fields' do
expected_fields = [:id, :title, :project, :author,
- :file_name, :content, :description,
+ :file_name, :description,
:visibility_level, :created_at, :updated_at,
:web_url, :raw_url, :notes, :discussions,
- :user_permissions, :description_html]
+ :user_permissions, :description_html, :blob]
is_expected.to have_graphql_fields(*expected_fields)
end
diff --git a/spec/graphql/types/snippets/blob_type_spec.rb b/spec/graphql/types/snippets/blob_type_spec.rb
new file mode 100644
index 00000000000..f1837538b53
--- /dev/null
+++ b/spec/graphql/types/snippets/blob_type_spec.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe GitlabSchema.types['SnippetBlob'] do
+ it 'has the correct fields' do
+ expected_fields = [:highlighted_data, :raw_path,
+ :size, :binary, :name, :path,
+ :simple_viewer, :rich_viewer]
+
+ is_expected.to have_graphql_fields(*expected_fields)
+ end
+end
diff --git a/spec/graphql/types/snippets/blob_viewer_type_spec.rb b/spec/graphql/types/snippets/blob_viewer_type_spec.rb
new file mode 100644
index 00000000000..f1f7608cb69
--- /dev/null
+++ b/spec/graphql/types/snippets/blob_viewer_type_spec.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe GitlabSchema.types['SnippetBlobViewer'] do
+ it 'has the correct fields' do
+ expected_fields = [:type, :load_async, :too_large, :collapsed,
+ :render_error, :file_type, :loading_partial_name]
+
+ is_expected.to have_graphql_fields(*expected_fields)
+ end
+end