diff options
author | Valery Sizov <valery@gitlab.com> | 2017-05-26 16:29:42 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-05-26 17:43:51 +0300 |
commit | 33687db01d399b6b1e6b6a120995d84f833baac4 (patch) | |
tree | cdc7f7e59f16e751af03f7193d03c81535e01789 /spec/services/merge_requests | |
parent | 0d65fd031da83aad5d0b251d315b5e47256bbb6c (diff) |
Fix counters cache invalidation for Issues and Merge Requests
Diffstat (limited to 'spec/services/merge_requests')
-rw-r--r-- | spec/services/merge_requests/close_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/merge_requests/post_merge_service_spec.rb | 15 | ||||
-rw-r--r-- | spec/services/merge_requests/reopen_service_spec.rb | 2 |
3 files changed, 19 insertions, 0 deletions
diff --git a/spec/services/merge_requests/close_service_spec.rb b/spec/services/merge_requests/close_service_spec.rb index d55a7657c0e..154f30aac3b 100644 --- a/spec/services/merge_requests/close_service_spec.rb +++ b/spec/services/merge_requests/close_service_spec.rb @@ -15,6 +15,8 @@ describe MergeRequests::CloseService, services: true do end describe '#execute' do + it_behaves_like 'cache counters invalidator' + context 'valid params' do let(:service) { described_class.new(project, user, {}) } diff --git a/spec/services/merge_requests/post_merge_service_spec.rb b/spec/services/merge_requests/post_merge_service_spec.rb new file mode 100644 index 00000000000..a20b32eda5f --- /dev/null +++ b/spec/services/merge_requests/post_merge_service_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe MergeRequests::PostMergeService, services: true do + let(:user) { create(:user) } + let(:merge_request) { create(:merge_request, assignee: user) } + let(:project) { merge_request.project } + + before do + project.team << [user, :master] + end + + describe '#execute' do + it_behaves_like 'cache counters invalidator' + end +end diff --git a/spec/services/merge_requests/reopen_service_spec.rb b/spec/services/merge_requests/reopen_service_spec.rb index a99d4eac9bd..b6d4db2f922 100644 --- a/spec/services/merge_requests/reopen_service_spec.rb +++ b/spec/services/merge_requests/reopen_service_spec.rb @@ -14,6 +14,8 @@ describe MergeRequests::ReopenService, services: true do end describe '#execute' do + it_behaves_like 'cache counters invalidator' + context 'valid params' do let(:service) { described_class.new(project, user, {}) } |