diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-06 14:48:53 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-06 14:48:53 +0100 |
commit | b7d74401854198c7395d7d2c4ef76d9ef56f6d5f (patch) | |
tree | 05035cbec5ee984d62a0a6bf25f8526b789676d8 | |
parent | c4d5b231ed5888367912db000ebd8e2856709bc0 (diff) | |
download | gitlab-ce-b7d74401854198c7395d7d2c4ef76d9ef56f6d5f.tar.gz |
Fix Rubocop offenses in commit status/build specs
-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 |