Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-20 13:56:27 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-20 13:56:27 +0300
commitc7a7ef044cf79dcd5ffd25b9fb325cd0abd612b2 (patch)
tree87d072262b64d8ccb89b4b9ce00bac497b912c95 /spec/models/commit_status_spec.rb
parent9c10683b01f9b32275a04bf9ed4e84795a527db7 (diff)
Use a new stage_id reference to a persisted stage
Diffstat (limited to 'spec/models/commit_status_spec.rb')
-rw-r--r--spec/models/commit_status_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb
index c7651ce9b46..f54e1131813 100644
--- a/spec/models/commit_status_spec.rb
+++ b/spec/models/commit_status_spec.rb
@@ -409,9 +409,10 @@ describe CommitStatus, :models do
end
describe '#stage_entity' do
- let!(:stage) do
- create(:ci_stage_entity, pipeline: commit_status.pipeline,
- name: commit_status.stage)
+ let(:stage) { create(:ci_stage_entity) }
+
+ let(:commit_status) do
+ create(:commit_status, stage_id: stage.id)
end
it 'has a correct association with persisted stage' do