diff options
-rw-r--r-- | spec/models/ci/build_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/commit_status_spec.rb | 16 |
2 files changed, 10 insertions, 12 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 900fd69e32f..2db42a94077 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -767,20 +767,18 @@ describe Ci::Build, :models do end end end - - context 'when build does not have script or before script' do - end end - describe '#has_tags?' do context 'when build has tags' do subject { create(:ci_build, tag_list: ['tag']) } + it { is_expected.to have_tags } end context 'when build does not have tags' do subject { create(:ci_build, tag_list: []) } + it { is_expected.not_to have_tags } end end diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index fee3c001e22..ea5e4e21039 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -199,14 +199,14 @@ describe CommitStatus, :models do subject { described_class.failed_but_allowed.order(:id) } let(:statuses) do - [create_status(allow_failure: true, status: 'success'), - create_status(allow_failure: true, status: 'failed'), - create_status(allow_failure: false, status: 'success'), - create_status(allow_failure: false, status: 'failed'), - create_status(allow_failure: true, status: 'canceled'), - create_status(allow_failure: false, status: 'canceled'), - create_status(allow_failure: true, status: 'manual'), - create_status(allow_failure: false, status: 'manual')] + [create_status(allow_failure: true, status: 'success'), + create_status(allow_failure: true, status: 'failed'), + create_status(allow_failure: false, status: 'success'), + create_status(allow_failure: false, status: 'failed'), + create_status(allow_failure: true, status: 'canceled'), + create_status(allow_failure: false, status: 'canceled'), + create_status(allow_failure: true, status: 'manual'), + create_status(allow_failure: false, status: 'manual')] end it 'returns statuses without what we want to ignore' do |