Commit cad19781 authored by Peter Leitzen's avatar Peter Leitzen

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

Fix leaky constant in commit entity spec

See merge request gitlab-org/gitlab!32039
parents 679e599c dc14a890
......@@ -371,7 +371,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/models/concerns/bulk_insertable_associations_spec.rb'
- 'spec/models/concerns/triggerable_hooks_spec.rb'
- 'spec/models/repository_spec.rb'
- '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/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
......
---
title: Fix leaky constant issue in commit entity spec
merge_request: 32039
author: Rajendra Kadam
type: fixed
......@@ -3,7 +3,7 @@
require 'spec_helper'
describe CommitEntity do
SIGNATURE_HTML = 'TEST'.freeze
let(:signature_html) { 'TEST' }
let(:entity) do
described_class.new(commit, request: request)
......@@ -16,7 +16,7 @@ describe CommitEntity do
before do
render = double('render')
allow(render).to receive(:call).and_return(SIGNATURE_HTML)
allow(render).to receive(:call).and_return(signature_html)
allow(request).to receive(:project).and_return(project)
allow(request).to receive(:render).and_return(render)
......@@ -83,7 +83,7 @@ describe CommitEntity do
it 'exposes "signature_html"' do
expect(request.render).to receive(:call)
expect(subject.fetch(:signature_html)).to be SIGNATURE_HTML
expect(subject.fetch(:signature_html)).to be signature_html
end
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