diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-10 14:55:51 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-10 14:55:51 +0300 |
commit | 4c643108409350bb975097a77326945cf680d9b9 (patch) | |
tree | d2be62f0fb8d8ead1dfbb09625b5661d35c024bf /spec | |
parent | dba65ab68050a216f57a15ab678606de0f533c56 (diff) | |
parent | f27e972e84b488fb96202772872379113f72c789 (diff) |
Merge branch 'grapify-milestone-api' into 'master'
Grapify milestones API
## What are the relevant issue numbers?
Related to #22928
See merge request !7373
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/milestones_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/milestones_spec.rb b/spec/requests/api/milestones_spec.rb index dd192bea432..62327f64e50 100644 --- a/spec/requests/api/milestones_spec.rb +++ b/spec/requests/api/milestones_spec.rb @@ -123,6 +123,15 @@ describe API::API, api: true do expect(json_response['title']).to eq('updated title') end + it 'removes a due date if nil is passed' do + milestone.update!(due_date: "2016-08-05") + + put api("/projects/#{project.id}/milestones/#{milestone.id}", user), due_date: nil + + expect(response).to have_http_status(200) + expect(json_response['due_date']).to be_nil + end + it 'returns a 404 error if milestone id not found' do put api("/projects/#{project.id}/milestones/1234", user), title: 'updated title' |