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

Merge branch '33803-drop-json-support-in-project-milestone' into 'master'

Drop JSON support from Projects::MilestonesController#show

Closes #33803

See merge request gitlab-org/gitlab-ce!17977
parents cb94afc5 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
......
---
title: Drop JSON response in Project Milestone along with avoiding error
merge_request: 17977
author: Takuya Noguchi
type: fixed
......@@ -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
......
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