diff options
author | Valery Sizov <valery@gitlab.com> | 2017-05-10 23:54:10 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-05-12 14:12:29 +0300 |
commit | e2a3a5095abd8c1fa57dd19e4ff693ae4021fde8 (patch) | |
tree | 435cd38964d20a0b1ad67b9dc02dcdbbe76d00c1 /spec/services/merge_requests/update_service_spec.rb | |
parent | 92bf7dfcb040e3e035fc87b0a70461f891284c98 (diff) | |
download | gitlab-ce-e2a3a5095abd8c1fa57dd19e4ff693ae4021fde8.tar.gz |
Move update_assignee_cache_counts to the service
Diffstat (limited to 'spec/services/merge_requests/update_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index 07f5440cc36..2c8fbb46e75 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -299,6 +299,15 @@ describe MergeRequests::UpdateService, services: true do end end + context 'when the assignee changes' do + it 'updates open merge request counter for assignees when merge request is reassigned' do + update_merge_request(assignee_id: user2.id) + + expect(user3.assigned_open_merge_requests_count).to eq 0 + expect(user2.assigned_open_merge_requests_count).to eq 1 + end + end + context 'when the target branch change' do before do update_merge_request({ target_branch: 'target' }) |