Commit 4a067f44 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Stub class in resolve discussion spec

parent 1d35e510
......@@ -395,7 +395,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/serializers/commit_entity_spec.rb'
- 'spec/services/clusters/applications/check_installation_progress_service_spec.rb'
- 'spec/services/clusters/applications/check_uninstall_progress_service_spec.rb'
- 'spec/services/issues/resolve_discussions_spec.rb'
- 'spec/support/shared_contexts/spam_constants.rb'
- 'spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
- 'spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb'
......
---
title: Stub class constant in resolve discussion spec
merge_request: 31965
author: Rajendra Kadam
type: fixed
......@@ -3,19 +3,20 @@
require 'spec_helper.rb'
describe Issues::ResolveDiscussions do
class DummyService < Issues::BaseService
include ::Issues::ResolveDiscussions
def initialize(*args)
super
filter_resolve_discussion_params
end
end
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
before do
stub_const('DummyService', Class.new(Issues::BaseService))
DummyService.class_eval do
include ::Issues::ResolveDiscussions
def initialize(*args)
super
filter_resolve_discussion_params
end
end
project.add_developer(user)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment