Commit 226bd0cc authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'leaky-constant-fix-7' into 'master'

Stub class in resolve discussion spec

See merge request gitlab-org/gitlab!31965
parents a1b288e2 4a067f44
......@@ -393,7 +393,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,7 +3,12 @@
require 'spec_helper.rb'
describe Issues::ResolveDiscussions do
class DummyService < Issues::BaseService
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)
......@@ -12,10 +17,6 @@ describe Issues::ResolveDiscussions do
end
end
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
before do
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