Commit 0cce5877 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'remove-unnecessary-existance-check-on-persistent-ref' into 'master'

Remove unnecessary existence check on persistent ref

See merge request gitlab-org/gitlab!20430
parents f76c2f15 1712b688
......@@ -22,7 +22,7 @@ module Ci
end
def create
return unless enabled? && !exist?
return unless enabled?
create_ref(sha, path)
rescue => e
......
......@@ -73,8 +73,8 @@ describe Ci::PersistentRef do
pipeline.persistent_ref.create
end
it 'does not create a persistent ref' do
expect(project.repository).not_to receive(:create_ref)
it 'overwrites a persistent ref' do
expect(project.repository).to receive(:create_ref).and_call_original
subject
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