diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-11-09 17:14:02 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-11-10 13:16:21 +0300 |
commit | f27e972e84b488fb96202772872379113f72c789 (patch) | |
tree | e2ebf2104677e025679e444a97c74bd8d813fcbb /spec | |
parent | c392b0cc24ba40e3fed920c6c693cb24665193af (diff) |
Grapify milestones API
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' |