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/controllers/projects/artifacts_controller_spec.rb')
-rw-r--r--spec/controllers/projects/artifacts_controller_spec.rb18
1 files changed, 18 insertions, 0 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