diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-30 18:43:45 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-30 18:43:45 +0300 |
commit | 7c36e8561c60882e6b0b47c563f7d19f3d6b02a6 (patch) | |
tree | 2c833fc39f5a86717ddedf1e5e47cf247daf0f9a /spec | |
parent | 4e8bde967e9beb2d2749bd9d2358adeb895ae2dc (diff) | |
parent | b5987e62ea609b2bb55ab762d074a1fd2642d325 (diff) |
Merge branch '41967_issue_api_closed_by_info' into 'master'
Add closed by information to issue API
See merge request gitlab-org/gitlab-ce!17042
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/import_export/all_models.yml | 1 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/safe_model_attributes.yml | 1 | ||||
-rw-r--r-- | spec/services/issues/close_service_spec.rb | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index a204a8f1ffe..b675d5dc031 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -18,6 +18,7 @@ issues: - metrics - timelogs - issue_assignees +- closed_by events: - author - project diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 0716852f57f..f949a23ffbb 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -15,6 +15,7 @@ Issue: - updated_by_id - confidential - closed_at +- closed_by_id - due_date - moved_to_id - lock_version diff --git a/spec/services/issues/close_service_spec.rb b/spec/services/issues/close_service_spec.rb index 47c1ebbeb81..7ae49c06896 100644 --- a/spec/services/issues/close_service_spec.rb +++ b/spec/services/issues/close_service_spec.rb @@ -67,6 +67,10 @@ describe Issues::CloseService do expect(issue).to be_closed end + it 'records closed user' do + expect(issue.closed_by_id).to be(user.id) + end + it 'sends email to user2 about assign of new issue' do email = ActionMailer::Base.deliveries.last expect(email.to.first).to eq(user2.email) |