提交 9e9137a6 编写于 作者: R Reuben Pereira

Remove the Project#to_reference_with_postfix method since it is only used in...

Remove the Project#to_reference_with_postfix method since it is only used in the project_reference_filter_spec
上级 7429eb3b
......@@ -904,10 +904,6 @@ class Project < ActiveRecord::Base
end
end
def to_reference_with_postfix
"#{to_reference(full: true)}#{self.class.reference_postfix}"
end
# `from` argument can be a Namespace or Project.
def to_reference(from = nil, full: false)
if full || cross_namespace_reference?(from)
......
......@@ -8,7 +8,7 @@ describe Banzai::Filter::ProjectReferenceFilter do
end
def get_reference(project)
project.to_reference_with_postfix
"#{project.to_reference(full: true)}#{Project.reference_postfix}"
end
let(:project) { create(:project, :public) }
......
......@@ -344,15 +344,6 @@ describe Project do
it { is_expected.to delegate_method(:name).to(:owner).with_prefix(true).with_arguments(allow_nil: true) }
end
describe '#to_reference_with_postfix' do
it 'returns the full path with reference_postfix' do
namespace = create(:namespace, path: 'sample-namespace')
project = create(:project, path: 'sample-project', namespace: namespace)
expect(project.to_reference_with_postfix).to eq 'sample-namespace/sample-project>'
end
end
describe '#to_reference' do
let(:owner) { create(:user, name: 'Gitlab') }
let(:namespace) { create(:namespace, path: 'sample-namespace', owner: owner) }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册