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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
a48ac407
Commit
a48ac407
authored
Jun 17, 2017
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop JSON response in Project Milestone along with avoiding error
parent
391732a2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+4
-0
changelogs/unreleased/33803-drop-json-support-in-project-milestone.yml
...released/33803-drop-json-support-in-project-milestone.yml
+5
-0
spec/controllers/projects/milestones_controller_spec.rb
spec/controllers/projects/milestones_controller_spec.rb
+11
-2
No files found.
app/controllers/projects/milestones_controller.rb
View file @
a48ac407
...
@@ -42,6 +42,10 @@ class Projects::MilestonesController < Projects::ApplicationController
...
@@ -42,6 +42,10 @@ class Projects::MilestonesController < Projects::ApplicationController
def
show
def
show
@project_namespace
=
@project
.
namespace
.
becomes
(
Namespace
)
@project_namespace
=
@project
.
namespace
.
becomes
(
Namespace
)
respond_to
do
|
format
|
format
.
html
end
end
end
def
create
def
create
...
...
changelogs/unreleased/33803-drop-json-support-in-project-milestone.yml
0 → 100644
View file @
a48ac407
---
title
:
Drop JSON response in Project Milestone along with avoiding error
merge_request
:
17977
author
:
Takuya Noguchi
type
:
fixed
spec/controllers/projects/milestones_controller_spec.rb
View file @
a48ac407
...
@@ -20,14 +20,23 @@ describe Projects::MilestonesController do
...
@@ -20,14 +20,23 @@ describe Projects::MilestonesController do
describe
"#show"
do
describe
"#show"
do
render_views
render_views
def
view_milestone
def
view_milestone
(
options
=
{})
get
:show
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
milestone
.
iid
params
=
{
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
milestone
.
iid
}
get
:show
,
params
.
merge
(
options
)
end
end
it
'shows milestone page'
do
it
'shows milestone page'
do
view_milestone
view_milestone
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
.
content_type
).
to
eq
'text/html'
end
it
'returns milestone json'
do
view_milestone
format: :json
expect
(
response
).
to
have_http_status
(
404
)
expect
(
response
.
content_type
).
to
eq
'application/json'
end
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