From 0f1ca8b3e7454a6fa788f8e57607b95f3195e145 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 22 Aug 2012 13:19:55 -0400 Subject: [PATCH] Remove DELETE API for Milestones --- lib/api/milestones.rb | 12 ------------ spec/api/milestones_spec.rb | 8 -------- 2 files changed, 20 deletions(-) diff --git a/lib/api/milestones.rb b/lib/api/milestones.rb index 3cdb7d9f7d2..1ddcd1f8c89 100644 --- a/lib/api/milestones.rb +++ b/lib/api/milestones.rb @@ -76,18 +76,6 @@ module Gitlab error!({'message' => '404 Not found'}, 404) end end - - # Delete a project milestone - # - # Parameters: - # id (required) - The ID or code name of a project - # milestone_id (required) - The ID of a project milestone - # Example Request: - # DELETE /projects/:id/milestones/:milestone_id - delete ":id/milestones/:milestone_id" do - @milestone = user_project.milestones.find(params[:milestone_id]) - @milestone.destroy - end end end end diff --git a/spec/api/milestones_spec.rb b/spec/api/milestones_spec.rb index 23f19dddcbd..ba1d15cc842 100644 --- a/spec/api/milestones_spec.rb +++ b/spec/api/milestones_spec.rb @@ -42,12 +42,4 @@ describe Gitlab::API do json_response['title'].should == 'updated title' end end - - describe "DELETE /projects/:id/milestones/:milestone_id" do - it "should delete a project milestone" do - expect { - delete "#{api_prefix}/projects/#{project.code}/milestones/#{milestone.id}?private_token=#{user.private_token}" - }.to change { Milestone.count }.by(-1) - end - end end