diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-08-21 14:47:44 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-08-21 14:47:44 +0300 |
commit | e00e62c2c8ddf8d12145660a3478065caab4c4ca (patch) | |
tree | df5600704090efccaa399816556696e4487c4e36 /spec/workers | |
parent | d6547ce0e78e2eecac76af8509cc5f7eea5fc369 (diff) | |
parent | 3a1103fd9173e8cb7a70c871d6a54a846f6eee4a (diff) |
Merge branch 'backstage/gb/migrate-stages-statuses' into 'master'
Migrate CI/CD stages statuses
Closes #33453
See merge request !12584
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/stage_update_worker_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/workers/stage_update_worker_spec.rb b/spec/workers/stage_update_worker_spec.rb new file mode 100644 index 00000000000..7bc76c79464 --- /dev/null +++ b/spec/workers/stage_update_worker_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe StageUpdateWorker do + describe '#perform' do + context 'when stage exists' do + let(:stage) { create(:ci_stage_entity) } + + it 'updates stage status' do + expect_any_instance_of(Ci::Stage).to receive(:update_status) + + described_class.new.perform(stage.id) + end + end + + context 'when stage does not exist' do + it 'does not raise exception' do + expect { described_class.new.perform(123) } + .not_to raise_error + end + end + end +end |