Revision aa0f58ea
Added by Stephen Benjamin over 5 years ago
test/unit/medium_providers/default_test.rb | ||
---|---|---|
require 'test_helper'
|
||
|
||
class DefaultMediumProviderTest < ActiveSupport::TestCase
|
||
test 'returns default provider for managed host' do
|
||
host = FactoryBot.create(:host, :managed)
|
||
medium_provider = Foreman::Plugin.medium_providers.find_provider(host)
|
||
assert_instance_of MediumProviders::Default, medium_provider
|
||
end
|
||
|
||
test 'interpolated $version does not include dots if only major is specified' do
|
||
operatingsystem = FactoryBot.build_stubbed(:operatingsystem, :name => 'foo', :major => '4')
|
||
architecture = FactoryBot.build_stubbed(:architecture, :name => 'x64')
|
Also available in: Unified diff
fixes #25007 - fix medium providers for plugins
Katello doesn't have medium set, since the medium is being provided
through the medium provider. This change allows a medium provider
to function in this case.