From 36a8cc3eca62c28ff9001be9378f76b7d59a2f4d Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Wed, 19 Apr 2017 18:17:46 +0300 Subject: Remove helpers assigned_issuables_count and cached_assigned_issuables_count --- spec/models/merge_request_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'spec/models/merge_request_spec.rb') diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 90b3a2ba42d..415d3e7b200 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -820,15 +820,17 @@ describe MergeRequest, models: true do user1 = create(:user) user2 = create(:user) mr = create(:merge_request, assignee: user1) + mr.project.add_developer(user1) + mr.project.add_developer(user2) - expect(user1.assigned_open_merge_request_count).to eq(1) - expect(user2.assigned_open_merge_request_count).to eq(0) + expect(user1.assigned_open_merge_requests_count).to eq(1) + expect(user2.assigned_open_merge_requests_count).to eq(0) mr.assignee = user2 mr.save - expect(user1.assigned_open_merge_request_count).to eq(0) - expect(user2.assigned_open_merge_request_count).to eq(1) + expect(user1.assigned_open_merge_requests_count).to eq(0) + expect(user2.assigned_open_merge_requests_count).to eq(1) end end -- cgit v1.2.1