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/models/issue_spec.rb | |
parent | 92bf7dfcb040e3e035fc87b0a70461f891284c98 (diff) |
Move update_assignee_cache_counts to the service
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r-- | spec/models/issue_spec.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 725f5c2311f..bb4e70db2e9 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -38,46 +38,6 @@ describe Issue, models: true do end end - describe "before_save" do - describe "#update_cache_counts when an issue is reassigned" do - let(:issue) { create(:issue) } - let(:assignee) { create(:user) } - - context "when previous assignee exists" do - before do - issue.project.team << [assignee, :developer] - issue.assignees << assignee - end - - it "updates cache counts for new assignee" do - user = create(:user) - - expect(user).to receive(:update_cache_counts) - - issue.assignees << user - end - - it "updates cache counts for previous assignee" do - issue.assignees.first - - expect_any_instance_of(User).to receive(:update_cache_counts) - - issue.assignees.destroy_all - end - end - - context "when previous assignee does not exist" do - it "updates cache count for the new assignee" do - issue.assignees = [] - - expect_any_instance_of(User).to receive(:update_cache_counts) - - issue.assignees << assignee - end - end - end - end - describe '#card_attributes' do it 'includes the author name' do allow(subject).to receive(:author).and_return(double(name: 'Robert')) |