summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-26 14:50:48 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-26 14:50:48 +0200
commit7d6538f2e2a6f1b0808a77e347a9083295b17c8c (patch)
tree0931d441724c26c1cce14afb06d3b4166ac86304 /spec
parentf4e01b597c7cb40797d0b690451322bc79d8dfe0 (diff)
downloadgitlab-ce-7d6538f2e2a6f1b0808a77e347a9083295b17c8c.tar.gz
Rename method responsible for updating stage status
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/stage_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/ci/stage_spec.rb b/spec/models/ci/stage_spec.rb
index 3dc00017a2c..d5c66598451 100644
--- a/spec/models/ci/stage_spec.rb
+++ b/spec/models/ci/stage_spec.rb
@@ -40,7 +40,7 @@ describe Ci::Stage, :models do
end
end
- describe 'update!' do
+ describe 'update_status' do
context 'when stage objects needs to be updated' do
before do
create(:ci_build, :success, stage_id: stage.id)
@@ -48,7 +48,7 @@ describe Ci::Stage, :models do
end
it 'updates stage status correctly' do
- expect { stage.update! }
+ expect { stage.update_status }
.to change { stage.reload.status }
.to 'running'
end
@@ -56,7 +56,7 @@ describe Ci::Stage, :models do
context 'when stage is skipped' do
it 'updates status to skipped' do
- expect { stage.update! }
+ expect { stage.update_status }
.to change { stage.reload.status }
.to 'skipped'
end
@@ -70,7 +70,7 @@ describe Ci::Stage, :models do
it 'retries a lock to update a stage status' do
stage.lock_version = 100
- stage.update!
+ stage.update_status
expect(stage.reload).to be_failed
end