diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-29 10:12:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-29 10:12:44 +0300 |
commit | 6a4f265c940d3d0a9aeacf09222920d7d2cc4e45 (patch) | |
tree | 4cf73897e78f8fee50e39edb7d74fa628b6a87da /spec/controllers | |
parent | cba453953c1598f83b2ed72bc012b65e0df5b767 (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/artifacts_controller_spec.rb | 18 | ||||
-rw-r--r-- | spec/controllers/projects/environments/prometheus_api_controller_spec.rb | 4 |
2 files changed, 20 insertions, 2 deletions
diff --git a/spec/controllers/projects/artifacts_controller_spec.rb b/spec/controllers/projects/artifacts_controller_spec.rb index be616b566dd..4c815a5b40c 100644 --- a/spec/controllers/projects/artifacts_controller_spec.rb +++ b/spec/controllers/projects/artifacts_controller_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' describe Projects::ArtifactsController do + include RepoHelpers + let(:user) { project.owner } let_it_be(:project) { create(:project, :repository, :public) } @@ -481,6 +483,22 @@ describe Projects::ArtifactsController do expect(response).to redirect_to(path) end end + + context 'with a failed pipeline on an updated master' do + before do + create_file_in_repo(project, 'master', 'master', 'test.txt', 'This is test') + + create(:ci_pipeline, + project: project, + sha: project.commit.sha, + ref: project.default_branch, + status: 'failed') + + get :latest_succeeded, params: params_from_ref(project.default_branch) + end + + it_behaves_like 'redirect to the job' + end end end end diff --git a/spec/controllers/projects/environments/prometheus_api_controller_spec.rb b/spec/controllers/projects/environments/prometheus_api_controller_spec.rb index 64f90e44bb6..fb8da52930c 100644 --- a/spec/controllers/projects/environments/prometheus_api_controller_spec.rb +++ b/spec/controllers/projects/environments/prometheus_api_controller_spec.rb @@ -84,12 +84,12 @@ describe Projects::Environments::PrometheusApiController do before do expected_params[:query] = %{up{pod_name="#{pod_name}"}} - expected_params[:variables] = ['pod_name', pod_name] + expected_params[:variables] = { 'pod_name' => pod_name } end it 'replaces variables with values' do get :proxy, params: environment_params.merge( - query: 'up{pod_name="{{pod_name}}"}', variables: ['pod_name', pod_name] + query: 'up{pod_name="{{pod_name}}"}', variables: { 'pod_name' => pod_name } ) expect(response).to have_gitlab_http_status(:success) |