diff options
author | Rémy Coutable <remy@rymai.me> | 2017-11-13 15:44:52 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-13 15:44:52 +0300 |
commit | 2e13dafbe822077280a5e30d9807963af457e20e (patch) | |
tree | 637bf45aca0a9918fef1461130a0cb08831c6fa2 /spec | |
parent | c608c25003906da8c934b99fc0d1bdf6f8e21c90 (diff) | |
parent | 3963f91ee355e26778dc6a6ccfd844af3cee194f (diff) |
Merge branch '39602-move-update-project-counter-caches-out-of-issues-merge-requests' into 'master'
Move update_project_counter_caches? out of issue and merge request
Closes #39602
See merge request gitlab-org/gitlab-ce!15300
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/issue_spec.rb | 18 | ||||
-rw-r--r-- | spec/models/merge_request_spec.rb | 12 |
2 files changed, 0 insertions, 30 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index bb5033c1628..5f901262598 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -765,22 +765,4 @@ describe Issue do expect(described_class.public_only).to eq([public_issue]) end end - - describe '#update_project_counter_caches?' do - it 'returns true when the state changes' do - subject.state = 'closed' - - expect(subject.update_project_counter_caches?).to eq(true) - end - - it 'returns true when the confidential flag changes' do - subject.confidential = true - - expect(subject.update_project_counter_caches?).to eq(true) - end - - it 'returns false when the state or confidential flag did not change' do - expect(subject.update_project_counter_caches?).to eq(false) - end - end end diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index d022dae3476..d250ad50713 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -1772,16 +1772,4 @@ describe MergeRequest do .to change { project.open_merge_requests_count }.from(1).to(0) end end - - describe '#update_project_counter_caches?' do - it 'returns true when the state changes' do - subject.state = 'closed' - - expect(subject.update_project_counter_caches?).to eq(true) - end - - it 'returns false when the state did not change' do - expect(subject.update_project_counter_caches?).to eq(false) - end - end end |