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
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+4
-0
33803-drop-json-support-in-project-milestone.yml
...released/33803-drop-json-support-in-project-milestone.yml
+5
-0
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
def
show
@project_namespace
=
@project
.
namespace
.
becomes
(
Namespace
)
respond_to
do
|
format
|
format
.
html
end
end
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
describe
"#show"
do
render_views
def
view_milestone
get
:show
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
milestone
.
iid
def
view_milestone
(
options
=
{})
params
=
{
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
milestone
.
iid
}
get
:show
,
params
.
merge
(
options
)
end
it
'shows milestone page'
do
view_milestone
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
...
...
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