diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-02-27 20:12:52 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-03-13 10:27:51 +0300 |
commit | ffe135ccf650da3d2415447e4ce648880c1a241d (patch) | |
tree | 14bf1a10764ea10fbf51a01cc6a3da12f163e7e5 /spec/services/issues | |
parent | 6ffa988ac7cae8d9a93680aaee1481e4169d6b4a (diff) |
Move functionality for resolving discussions into a concern
Diffstat (limited to 'spec/services/issues')
-rw-r--r-- | spec/services/issues/resolve_discussions_spec.rb (renamed from spec/services/issues/base_service_spec.rb) | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/spec/services/issues/base_service_spec.rb b/spec/services/issues/resolve_discussions_spec.rb index 0cef09917ee..332927d10ad 100644 --- a/spec/services/issues/base_service_spec.rb +++ b/spec/services/issues/resolve_discussions_spec.rb @@ -1,6 +1,15 @@ require 'spec_helper.rb' -describe Issues::BaseService, services: true do +class DummyService < Issues::BaseService + include ::Issues::ResolveDiscussions + + def initialize(*args) + super + filter_resolve_discussion_params + end +end + +describe DummyService, services: true do let(:project) { create(:project) } let(:user) { create(:user) } @@ -46,11 +55,11 @@ describe Issues::BaseService, services: true do end it "contains only unresolved discussions" do - second_discussion = Discussion.new([create(:diff_note_on_merge_request, :resolved, + _second_discussion = Discussion.new([create(:diff_note_on_merge_request, :resolved, noteable: merge_request, project: merge_request.target_project, line_number: 15, - )]) + )]) service = described_class.new( project, user, |