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

Fix non-hacking way

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