diff options
| author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-29 16:14:59 +0200 |
|---|---|---|
| committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-29 16:14:59 +0200 |
| commit | b231742687cf08d8663ce34a11f1b64f1fbe4a6a (patch) | |
| tree | e7cbf5b49f65b2e53e5b7e38fbb1aee2f8f80b52 /spec/requests/api | |
| parent | aabe93ce9c2c4947595f6d29628d5e1030bfb372 (diff) | |
| parent | 54957d6932c2b159e01b60ee1d4e191cfdf5b713 (diff) | |
| download | gitlab-ce-b231742687cf08d8663ce34a11f1b64f1fbe4a6a.tar.gz | |
Merge branch 'master' into add-ability-to-archive-a-project-via-api-14296add-ability-to-archive-a-project-via-api-14296
Diffstat (limited to 'spec/requests/api')
| -rw-r--r-- | spec/requests/api/issues_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index ce55cb7b0ae..822d3ad3017 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -318,6 +318,17 @@ describe API::API, api: true do 'is too long (maximum is 255 characters)' ]) end + + context 'when an admin or owner makes the request' do + it "accepts the creation date to be set" do + post api("/projects/#{project.id}/issues", user), + title: 'new issue', labels: 'label, label2', created_at: 2.weeks.ago + + expect(response.status).to eq(201) + # this take about a second, so probably not equal + expect(Time.parse(json_response['created_at'])).to be <= 2.weeks.ago + end + end end describe 'POST /projects/:id/issues with spam filtering' do |
