BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
34695569
Commit
34695569
authored
Dec 22, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Error 500 when global milestones have slashes
Closes #4226
parent
1cf45407
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
CHANGELOG
CHANGELOG
+3
-0
global_milestone.rb
app/models/global_milestone.rb
+1
-1
global_milestone_spec.rb
spec/models/global_milestone_spec.rb
+10
-0
No files found.
CHANGELOG
View file @
34695569
...
...
@@ -3,6 +3,9 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.4.0 (unreleased)
- Implement new UI for group page
v 8.3.1 (unreleased)
- Fix Error 500 when global milestones have slashes (Stan Hu)
v 8.3.0
- Add CAS support (tduehr)
- Bump rack-attack to 4.3.1 for security fix (Stan Hu)
...
...
app/models/global_milestone.rb
View file @
34695569
...
...
@@ -16,7 +16,7 @@ class GlobalMilestone
end
def
safe_title
@title
.
to_slug
.
to_s
@title
.
to_slug
.
normalize
.
to_s
end
def
expired?
...
...
spec/models/global_milestone_spec.rb
View file @
34695569
...
...
@@ -62,4 +62,14 @@ describe GlobalMilestone, models: true do
expect
(
@global_milestone
.
milestones
.
count
).
to
eq
(
3
)
end
end
describe
:safe_title
do
let
(
:milestone
)
{
create
(
:milestone
,
title:
"git / test"
,
project:
project1
)
}
it
'should strip out slashes and spaces'
do
global_milestone
=
GlobalMilestone
.
new
(
milestone
.
title
,
[
milestone
])
expect
(
global_milestone
.
safe_title
).
to
eq
(
'git-test'
)
end
end
end
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