Commit 34e16da8 authored by Mark Chao's avatar Mark Chao

Merge branch 'kerrizor/drop-unused-param-from-codeowners-file-initialize' into 'master'

Drop unused project param from #initialize

See merge request gitlab-org/gitlab!42510
parents 06a793fd 8bf36837
......@@ -7,9 +7,8 @@ module Gitlab
SECTION_HEADER_REGEX = /\[(.*?)\]/.freeze
def initialize(blob, project = nil)
def initialize(blob)
@blob = blob
@project = project
end
def parsed_data
......
......@@ -63,7 +63,7 @@ module Gitlab
def load_code_owners_file
code_owners_blob = @project.repository.code_owners_blob(ref: @ref)
Gitlab::CodeOwners::File.new(code_owners_blob, @project)
Gitlab::CodeOwners::File.new(code_owners_blob)
end
end
end
......
......@@ -5,6 +5,8 @@ require 'spec_helper'
RSpec.describe Gitlab::CodeOwners::File do
include FakeBlobHelpers
# 'project' is required for the #fake_blob helper
#
let(:project) { build(:project) }
let(:file_content) do
File.read(Rails.root.join('ee', 'spec', 'fixtures', 'codeowners_example'))
......
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