summaryrefslogtreecommitdiff
path: root/spec/models/ci
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb3
-rw-r--r--spec/models/ci/runner_spec.rb2
-rw-r--r--spec/models/ci/stage_spec.rb1
3 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 20915e6d3b1..d813a88c809 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -610,6 +610,7 @@ describe Ci::Build do
context 'artifacts archive is a zip file and metadata exists' do
let(:build) { create(:ci_build, :artifacts) }
+
it { is_expected.to be_truthy }
end
end
@@ -1408,6 +1409,7 @@ describe Ci::Build do
describe '#erased?' do
let!(:build) { create(:ci_build, :trace_artifact, :success, :artifacts) }
+
subject { build.erased? }
context 'job has not been erased' do
@@ -1469,6 +1471,7 @@ describe Ci::Build do
describe '#first_pending' do
let!(:first) { create(:ci_build, pipeline: pipeline, status: 'pending', created_at: Date.yesterday) }
let!(:second) { create(:ci_build, pipeline: pipeline, status: 'pending') }
+
subject { described_class.first_pending }
it { is_expected.to be_a(described_class) }
diff --git a/spec/models/ci/runner_spec.rb b/spec/models/ci/runner_spec.rb
index ac438f7d473..5c9a03a26ec 100644
--- a/spec/models/ci/runner_spec.rb
+++ b/spec/models/ci/runner_spec.rb
@@ -755,11 +755,13 @@ describe Ci::Runner do
context 'when group runner' do
let(:runner) { create(:ci_runner, :group, description: 'Group runner', groups: [group]) }
let(:group) { create(:group) }
+
it { is_expected.to be_falsey }
end
context 'when shared runner' do
let(:runner) { create(:ci_runner, :instance, description: 'Shared runner') }
+
it { is_expected.to be_falsey }
end
diff --git a/spec/models/ci/stage_spec.rb b/spec/models/ci/stage_spec.rb
index c997f1ef405..b65c11f837c 100644
--- a/spec/models/ci/stage_spec.rb
+++ b/spec/models/ci/stage_spec.rb
@@ -146,6 +146,7 @@ describe Ci::Stage, :models do
let(:user) { create(:user) }
let(:stage) { create(:ci_stage_entity, status: :created) }
+
subject { stage.detailed_status(user) }
where(:statuses, :label) do