diff options
Diffstat (limited to 'spec/models/ci/runner_version_spec.rb')
-rw-r--r-- | spec/models/ci/runner_version_spec.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/models/ci/runner_version_spec.rb b/spec/models/ci/runner_version_spec.rb index dfaa2201859..51a2f14c57c 100644 --- a/spec/models/ci/runner_version_spec.rb +++ b/spec/models/ci/runner_version_spec.rb @@ -3,33 +3,35 @@ require 'spec_helper' RSpec.describe Ci::RunnerVersion, feature_category: :runner_fleet do - let_it_be(:runner_version_recommended) do + let_it_be(:runner_version_upgrade_recommended) do create(:ci_runner_version, version: 'abc234', status: :recommended) end - let_it_be(:runner_version_not_available) do - create(:ci_runner_version, version: 'abc123', status: :not_available) + let_it_be(:runner_version_upgrade_unavailable) do + create(:ci_runner_version, version: 'abc123', status: :unavailable) end + it { is_expected.to have_many(:runner_machines).with_foreign_key(:version) } + it_behaves_like 'having unique enum values' - describe '.not_available' do - subject { described_class.not_available } + describe '.unavailable' do + subject { described_class.unavailable } - it { is_expected.to match_array([runner_version_not_available]) } + it { is_expected.to match_array([runner_version_upgrade_unavailable]) } end describe '.potentially_outdated' do subject { described_class.potentially_outdated } let_it_be(:runner_version_nil) { create(:ci_runner_version, version: 'abc345', status: nil) } - let_it_be(:runner_version_available) do + let_it_be(:runner_version_upgrade_available) do create(:ci_runner_version, version: 'abc456', status: :available) end it 'contains any valid or unprocessed runner version that is not already recommended' do is_expected.to match_array( - [runner_version_nil, runner_version_not_available, runner_version_available] + [runner_version_nil, runner_version_upgrade_unavailable, runner_version_upgrade_available] ) end end |