summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorTakuya Noguchi <takninnovationresearch@gmail.com>2017-06-17 15:40:12 +0900
committerTakuya Noguchi <takninnovationresearch@gmail.com>2018-03-25 22:58:55 +0900
commita48ac407109862c16ed57d3a10e8256aff394a07 (patch)
tree5fa977cce539f409ebffa123536bb17048acadfd /spec/controllers/projects
parent391732a2c1b04baf565c77f2788a1ec035b1d85e (diff)
downloadgitlab-ce-a48ac407109862c16ed57d3a10e8256aff394a07.tar.gz
Drop JSON response in Project Milestone along with avoiding error
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/milestones_controller_spec.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb
index 306094f7ffb..5b2614163ff 100644
--- a/spec/controllers/projects/milestones_controller_spec.rb
+++ b/spec/controllers/projects/milestones_controller_spec.rb
@@ -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