diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-18 13:37:00 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-18 13:37:00 +0800 |
commit | 5151ebf4c68b3ac87d51474b49962f0e5ba6d3e7 (patch) | |
tree | 4e6b204a79ba9641fd845cce91ca13ae16f38e00 /spec/models | |
parent | 39c1cabf27da7a082f4e3da669da6b91393016d9 (diff) | |
download | gitlab-ce-5151ebf4c68b3ac87d51474b49962f0e5ba6d3e7.tar.gz |
Use RSpec helpers, feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13125543
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/build_spec.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 7c95463a571..b2dcbd8da2e 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -628,7 +628,7 @@ describe Ci::Build, models: true do describe '#erasable?' do subject { build.erasable? } - it { is_expected.to eq true } + it { is_expected.to be_truthy } end describe '#erased?' do @@ -636,7 +636,7 @@ describe Ci::Build, models: true do subject { build.erased? } context 'build has not been erased' do - it { is_expected.to be false } + it { is_expected.to be_falsey } end context 'build has been erased' do @@ -644,12 +644,13 @@ describe Ci::Build, models: true do build.erase end - it { is_expected.to be true } + it { is_expected.to be_truthy } end end context 'metadata and build trace are not available' do let!(:build) { create(:ci_build, :success, :artifacts) } + before do build.remove_artifacts_metadata! end @@ -676,7 +677,7 @@ describe Ci::Build, models: true do end it 'returns false' do - expect(build.retryable?).to be(false) + expect(build).not_to be_retryable end end @@ -686,7 +687,7 @@ describe Ci::Build, models: true do end it 'returns true' do - expect(build.retryable?).to be(true) + expect(build).to be_retryable end end end |