Read about our upcoming Code of Conduct on this issue

Commit 02c46bfc authored by Mike Greiling's avatar Mike Greiling
Browse files

ensure fork_source returns nil when project is the root fork, add tests

parent 27f8a4ddb2f9
......@@ -1032,6 +1032,8 @@ def forked?
def fork_source
return nil unless forked?
forked_from_project || fork_network&.root_project
......@@ -1951,6 +1951,10 @@ def create_build(new_pipeline = pipeline, name = 'test')
expect(second_fork.fork_source).to eq(project)
it 'returns nil if it is the root of the fork network' do
expect(project.fork_source).to be_nil
describe '#lfs_storage_project' 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