Skip to content
Snippets Groups Projects
Commit 3e812b1f authored by Jason Goodman's avatar Jason Goodman
Browse files

Make ref_path private in Deployment

Avoid using send in Deployments::AfterCreateService spec
parent 2f22edb3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -280,12 +280,12 @@ def valid_ref
errors.add(:ref, _('The branch or tag does not exist'))
end
 
private
def ref_path
File.join(environment.ref_path, 'deployments', iid.to_s)
end
 
private
def legacy_finished_at
self.created_at if success? && !read_attribute(:finished_at)
end
Loading
Loading
Loading
Loading
@@ -49,7 +49,7 @@
it 'creates ref' do
expect_any_instance_of(Repository)
.to receive(:create_ref)
.with(deployment.sha, deployment.send(:ref_path))
.with(deployment.sha, "refs/environments/production/deployments/#{deployment.iid}")
 
service.execute
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment