diff options
Diffstat (limited to 'spec/models/ci/stage_spec.rb')
-rw-r--r-- | spec/models/ci/stage_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/models/ci/stage_spec.rb b/spec/models/ci/stage_spec.rb new file mode 100644 index 00000000000..911c468ff1a --- /dev/null +++ b/spec/models/ci/stage_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' + +describe Ci::Stage, :models do + describe '#status' do + context 'when stage is pending' do + let(:stage) { create(:ci_stage_entity, status: 'pending') } + + it 'has a correct status value' do + expect(stage.status).to eq 'pending' + end + end + + context 'when stage is success' do + let(:stage) { create(:ci_stage_entity, status: 'success') } + + it 'has a correct status value' do + expect(stage.status).to eq 'success' + end + end + end +end |