diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-11 00:08:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-11 00:08:51 +0000 |
commit | ed32a44fcb161cbc82cbbe5b78a0631c2c837e07 (patch) | |
tree | 3e71a32eda2a060ef4623f24f927ff81e471aa5a /spec/requests/api/graphql/project | |
parent | 5ec9ab0e8cc7293a364235d6cc57f6a77dce2c38 (diff) | |
download | gitlab-ce-ed32a44fcb161cbc82cbbe5b78a0631c2c837e07.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/graphql/project')
-rw-r--r-- | spec/requests/api/graphql/project/release_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/requests/api/graphql/project/release_spec.rb b/spec/requests/api/graphql/project/release_spec.rb index f9c19d9747d..38497246e8e 100644 --- a/spec/requests/api/graphql/project/release_spec.rb +++ b/spec/requests/api/graphql/project/release_spec.rb @@ -10,6 +10,7 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do let_it_be(:guest) { create(:user) } let_it_be(:reporter) { create(:user) } let_it_be(:stranger) { create(:user) } + let_it_be(:link_filepath) { '/direct/asset/link/path' } let(:params_for_issues_and_mrs) { { scope: 'all', state: 'opened', release_tag: release.tag } } let(:post_query) { post_graphql(query, current_user: current_user) } @@ -127,7 +128,7 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do let(:release_fields) do query_graphql_field(:assets, nil, - query_graphql_field(:links, nil, 'nodes { id name url external }')) + query_graphql_field(:links, nil, 'nodes { id name url external, directAssetUrl }')) end it 'finds all release links' do @@ -138,7 +139,8 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do 'id' => global_id_of(link), 'name' => link.name, 'url' => link.url, - 'external' => link.external? + 'external' => link.external?, + 'directAssetUrl' => link.filepath ? Gitlab::Routing.url_helpers.project_release_url(project, release) << link.filepath : link.url } end @@ -270,7 +272,7 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do let_it_be(:milestone_2) { create(:milestone, project: project) } let_it_be(:release) { create(:release, :with_evidence, project: project, milestones: [milestone_1, milestone_2]) } let_it_be(:release_link_1) { create(:release_link, release: release) } - let_it_be(:release_link_2) { create(:release_link, release: release) } + let_it_be(:release_link_2) { create(:release_link, release: release, filepath: link_filepath) } before_all do project.add_developer(developer) @@ -311,7 +313,7 @@ RSpec.describe 'Query.project(fullPath).release(tagName)' do let_it_be(:milestone_2) { create(:milestone, project: project) } let_it_be(:release) { create(:release, :with_evidence, project: project, milestones: [milestone_1, milestone_2]) } let_it_be(:release_link_1) { create(:release_link, release: release) } - let_it_be(:release_link_2) { create(:release_link, release: release) } + let_it_be(:release_link_2) { create(:release_link, release: release, filepath: link_filepath) } before_all do project.add_developer(developer) |