Commit a2d0a983 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'remove_build_badge_path_from_route' into 'master'

Remove build badge path from route

Closes #18824

See merge request gitlab-org/gitlab!20188
parents afe7c89a e595921d
---
title: Remove build badge path from route
merge_request: 20188
author: Lee Tickett
type: other
...@@ -494,8 +494,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -494,8 +494,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
collection do collection do
scope '*ref', constraints: { ref: Gitlab::PathRegex.git_reference_regex } do scope '*ref', constraints: { ref: Gitlab::PathRegex.git_reference_regex } do
constraints format: /svg/ do constraints format: /svg/ do
# Keep around until 10.0, see gitlab-org/gitlab-ce#35307
get :build, to: "badges#pipeline"
get :pipeline get :pipeline
get :coverage get :coverage
end end
......
...@@ -6,17 +6,6 @@ describe 'Pipeline Badge' do ...@@ -6,17 +6,6 @@ describe 'Pipeline Badge' do
set(:project) { create(:project, :repository, :public) } set(:project) { create(:project, :repository, :public) }
let(:ref) { project.default_branch } let(:ref) { project.default_branch }
# this can't be tested in the controller, as it bypasses the rails router
# and constructs a route based on the controller being tested
# Keep around until 10.0, see gitlab-org/gitlab-ce#35307
context 'when the deprecated badge is requested' do
it 'displays the badge' do
visit build_project_badges_path(project, ref: ref, format: :svg)
expect(page.status_code).to eq(200)
end
end
context 'when the project has a pipeline' do context 'when the project has a pipeline' do
let!(:pipeline) { create(:ci_empty_pipeline, project: project, ref: ref, sha: project.commit(ref).sha) } let!(:pipeline) { create(:ci_empty_pipeline, project: project, ref: ref, sha: project.commit(ref).sha) }
let!(:job) { create(:ci_build, pipeline: pipeline) } let!(:job) { create(:ci_build, pipeline: pipeline) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment