diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-23 09:12:40 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-23 10:55:52 -0200 |
commit | 59f4298566c4396f50a83c46bbacf89775927a9f (patch) | |
tree | 4d54caf5bfb3e9b85ac2c37aa9db7e36dc49badb /spec | |
parent | f063473849b92a450a5a9d756155c61feff7e634 (diff) | |
download | gitlab-ce-59f4298566c4396f50a83c46bbacf89775927a9f.tar.gz |
Merge branch 'fixes-issues-api-reopen' into 'master'
Fix state_event parameter to reopen an issue
Closes #25958
See merge request !8246
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/issues_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index 5c80dd98dc7..a786dc9edb3 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -932,6 +932,13 @@ describe API::Issues, api: true do expect(json_response['state']).to eq "closed" end + it 'reopens a project isssue' do + put api("/projects/#{project.id}/issues/#{closed_issue.id}", user), state_event: 'reopen' + + expect(response).to have_http_status(200) + expect(json_response['state']).to eq 'reopened' + end + context 'when an admin or owner makes the request' do it 'accepts the update date to be set' do update_time = 2.weeks.ago |