Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e595921d
Commit
e595921d
authored
Nov 27, 2019
by
Lee Tickett
Committed by
Rémy Coutable
Nov 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove build badge path from route
parent
afe7c89a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
changelogs/unreleased/remove_build_badge_path_from_route.yml
changelogs/unreleased/remove_build_badge_path_from_route.yml
+5
-0
config/routes/project.rb
config/routes/project.rb
+0
-2
spec/features/projects/badges/pipeline_badge_spec.rb
spec/features/projects/badges/pipeline_badge_spec.rb
+0
-11
No files found.
changelogs/unreleased/remove_build_badge_path_from_route.yml
0 → 100644
View file @
e595921d
---
title
:
Remove build badge path from route
merge_request
:
20188
author
:
Lee Tickett
type
:
other
config/routes/project.rb
View file @
e595921d
...
...
@@ -494,8 +494,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
collection
do
scope
'*ref'
,
constraints:
{
ref:
Gitlab
::
PathRegex
.
git_reference_regex
}
do
constraints
format:
/svg/
do
# Keep around until 10.0, see gitlab-org/gitlab-ce#35307
get
:build
,
to:
"badges#pipeline"
get
:pipeline
get
:coverage
end
...
...
spec/features/projects/badges/pipeline_badge_spec.rb
View file @
e595921d
...
...
@@ -6,17 +6,6 @@ describe 'Pipeline Badge' do
set
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
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
let!
(
:pipeline
)
{
create
(
:ci_empty_pipeline
,
project:
project
,
ref:
ref
,
sha:
project
.
commit
(
ref
).
sha
)
}
let!
(
:job
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment