Commit 08ef7b9f authored by Kamil Trzciński's avatar Kamil Trzciński

Fix non-hacking way

parent 7a98f0bd
......@@ -13,14 +13,13 @@ module Deployable
name: expanded_environment_name
)
environment.deployments.create!(
create_deployment!(
project_id: environment.project_id,
environment: environment,
ref: ref,
tag: tag,
sha: sha,
user: user,
deployable: self,
on_stop: on_stop)
end
end
......
......@@ -403,6 +403,8 @@ describe Ci::CreatePipelineService do
expect(result).to be_persisted
expect(Environment.find_by(name: "review/master")).to be_present
expect(result.builds.first.tag_list).to contain_exactly('hello')
expect(result.builds.first.deployment).to be_persisted
expect(result.builds.first.deployment.deployable).to be_a(Ci::Build)
end
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