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:
Diffstat (limited to 'spec/graphql/types')
-rw-r--r--spec/graphql/types/release_links_type_spec.rb18
-rw-r--r--spec/graphql/types/release_type_spec.rb9
2 files changed, 26 insertions, 1 deletions
diff --git a/spec/graphql/types/release_links_type_spec.rb b/spec/graphql/types/release_links_type_spec.rb
new file mode 100644
index 00000000000..1076cf37e0e
--- /dev/null
+++ b/spec/graphql/types/release_links_type_spec.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe GitlabSchema.types['ReleaseLinks'] do
+ it { expect(described_class).to require_graphql_authorizations(:download_code) }
+
+ it 'has the expected fields' do
+ expected_fields = %w[
+ selfUrl
+ mergeRequestsUrl
+ issuesUrl
+ editUrl
+ ]
+
+ expect(described_class).to include_graphql_fields(*expected_fields)
+ end
+end
diff --git a/spec/graphql/types/release_type_spec.rb b/spec/graphql/types/release_type_spec.rb
index 11eab7127c1..1001235702c 100644
--- a/spec/graphql/types/release_type_spec.rb
+++ b/spec/graphql/types/release_type_spec.rb
@@ -9,7 +9,8 @@ describe GitlabSchema.types['Release'] do
expected_fields = %w[
tag_name tag_path
description description_html
- name assets milestones evidences author commit
+ name milestones evidences author commit
+ assets links
created_at released_at
]
@@ -22,6 +23,12 @@ describe GitlabSchema.types['Release'] do
it { is_expected.to have_graphql_type(Types::ReleaseAssetsType) }
end
+ describe 'links field' do
+ subject { described_class.fields['links'] }
+
+ it { is_expected.to have_graphql_type(Types::ReleaseLinksType) }
+ end
+
describe 'milestones field' do
subject { described_class.fields['milestones'] }