diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-03 17:13:57 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-03 17:19:07 +0300 |
commit | f203ca5c932cc24787e1c44c5801c15923cd04ab (patch) | |
tree | 09579f2804330bb76d40b028d8d2f52b55f52448 /spec | |
parent | 3c3e61aaca34d1113d3cfb6076462beaf353e739 (diff) |
Fix specs related to deployments and environments
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/deployments.rb | 4 | ||||
-rw-r--r-- | spec/serializers/environment_serializer_spec.rb | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/factories/deployments.rb b/spec/factories/deployments.rb index 8c8e5dc54c2..6f24bf58d14 100644 --- a/spec/factories/deployments.rb +++ b/spec/factories/deployments.rb @@ -1,9 +1,9 @@ FactoryGirl.define do factory :deployment, class: Deployment do - sha 'b83d6e391c22777fca1ed3012fce84f633d7fed0' + sha '97de212e80737a608d939f648d959671fb0a0142' ref 'master' tag false - project + project nil environment factory: :environment diff --git a/spec/serializers/environment_serializer_spec.rb b/spec/serializers/environment_serializer_spec.rb index 81393beb416..32f144faf54 100644 --- a/spec/serializers/environment_serializer_spec.rb +++ b/spec/serializers/environment_serializer_spec.rb @@ -8,6 +8,7 @@ describe EnvironmentSerializer do end let(:user) { create(:user) } + let(:project) { create(:project) } context 'when there is a single object provided' do before do @@ -17,11 +18,12 @@ describe EnvironmentSerializer do let(:deployment) do create(:deployment, deployable: deployable, - user: user) + user: user, + project: project, + sha: project.commit.id) end let(:deployable) { create(:ci_build) } - let(:project) { deployment.project } let(:resource) { deployment.environment } it 'it generates payload for single object' do |