Commit aa735684 authored by Peter Leitzen's avatar Peter Leitzen

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

Fix leaky constant in cache headers spec and issues importer spec

See merge request gitlab-org/gitlab!32122
parents 58d3db3c db2277b8
......@@ -362,8 +362,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/lib/gitlab/git/diff_collection_spec.rb'
- 'spec/lib/gitlab/import_export/import_test_coverage_spec.rb'
- 'spec/lib/gitlab/import_export/project/relation_factory_spec.rb'
- 'spec/lib/gitlab/jira_import/issues_importer_spec.rb'
- 'spec/lib/gitlab/no_cache_headers_spec.rb'
- 'spec/lib/gitlab/path_regex_spec.rb'
- 'spec/lib/gitlab/quick_actions/dsl_spec.rb'
- 'spec/lib/marginalia_spec.rb'
......
---
title: Fix leaky constant issue importer and cache headers spec
merge_request: 32122
author: Rajendra Kadam
type: fixed
......@@ -39,8 +39,8 @@ describe Gitlab::JiraImport::IssuesImporter do
end
context 'with results returned' do
JiraIssue = Struct.new(:id)
let_it_be(:jira_issues) { [JiraIssue.new(1), JiraIssue.new(2)] }
jira_issue = Struct.new(:id)
let_it_be(:jira_issues) { [jira_issue.new(1), jira_issue.new(2)] }
def mock_issue_serializer(count)
serializer = instance_double(Gitlab::JiraImport::IssueSerializer, execute: { key: 'data' })
......
......@@ -3,8 +3,11 @@
require 'spec_helper'
describe Gitlab::NoCacheHeaders do
class NoCacheTester
include Gitlab::NoCacheHeaders
before do
stub_const('NoCacheTester', Class.new)
NoCacheTester.class_eval do
include Gitlab::NoCacheHeaders
end
end
describe "#no_cache_headers" do
......
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