Allow start_date as only parameter when updating Milestone via API

This commit is contained in:
Mark Fletcher 2018-05-24 16:03:58 +01:00
parent c52db71e36
commit 2dd1c8e5d8
2 changed files with 7 additions and 1 deletions

View file

@ -24,7 +24,7 @@ module API
optional :state_event, type: String, values: %w[close activate],
desc: 'The state event of the milestone '
use :optional_params
at_least_one_of :title, :description, :due_date, :state_event
at_least_one_of :title, :description, :start_date, :due_date, :state_event
end
def list_milestones_for(parent)

View file

@ -196,6 +196,12 @@ shared_examples_for 'group and project milestones' do |route_definition|
expect(json_response['state']).to eq('closed')
end
it 'updates milestone with only start date' do
put api(resource_route, user), start_date: Date.tomorrow
expect(response).to have_gitlab_http_status(200)
end
end
describe "GET #{route_definition}/:milestone_id/issues" do