diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-08 15:07:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-08 15:07:09 +0300 |
commit | e44c3e4832e43c77e9c29fad6e49f8d6066d7f5c (patch) | |
tree | 892f4505093dd5ffd60e238a8b74b35f021654ae /spec/models | |
parent | aa1c2a29b8ddc82141f826eacd169d3d7ff66611 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/runner_manager_spec.rb | 10 | ||||
-rw-r--r-- | spec/models/ci/stage_spec.rb | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/spec/models/ci/runner_manager_spec.rb b/spec/models/ci/runner_manager_spec.rb index 575064f0bea..d69bf1a0da0 100644 --- a/spec/models/ci/runner_manager_spec.rb +++ b/spec/models/ci/runner_manager_spec.rb @@ -112,6 +112,16 @@ RSpec.describe Ci::RunnerManager, feature_category: :runner_fleet, type: :model end end + describe '.order_id_desc' do + subject(:scope) { described_class.order_id_desc } + + let_it_be(:runner_manager1) { create(:ci_runner_machine) } + let_it_be(:runner_manager2) { create(:ci_runner_machine) } + + specify { expect(described_class.all).to eq([runner_manager1, runner_manager2]) } + it { is_expected.to eq([runner_manager2, runner_manager1]) } + end + describe '#status', :freeze_time do let(:runner_manager) { build(:ci_runner_machine, created_at: 8.days.ago) } diff --git a/spec/models/ci/stage_spec.rb b/spec/models/ci/stage_spec.rb index 1be50083cd4..79e92082ee1 100644 --- a/spec/models/ci/stage_spec.rb +++ b/spec/models/ci/stage_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Ci::Stage, :models, feature_category: :continuous_integration do +RSpec.describe Ci::Stage, :models do let_it_be(:pipeline) { create(:ci_empty_pipeline) } let(:stage) { create(:ci_stage, pipeline: pipeline, project: pipeline.project) } |