Sha256: 279fbc3c55c517597f77656bfe5c6c4d4eb023addc0a1a3b7f337c3288627574
Contents?: true
Size: 1.02 KB
Versions: 9
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true require 'test_plugin_helper' module ForemanBootdisk module Scope class BootdiskTest < ActiveSupport::TestCase let(:operatingsystem) { FactoryBot.create(:ubuntu14_10, :with_media, :with_archs) } let(:host) { FactoryBot.build(:host, :managed, operatingsystem: operatingsystem) } let(:source) { Foreman::Renderer::Source::String.new(content: 'Test') } let(:scope) { ForemanBootdisk::Scope::FullHostBootdisk.new(host: host, source: source) } setup do MediumProviders::Default.any_instance.stubs(:unique_id).returns('MyMedium01-ZYHBD6OPET') end describe '@kernel' do test 'should match filename on bootdisk' do assert_equal 'BOOT/MYMEDIUM01_ZYHBD6OPET_LINUX', scope.instance_variable_get('@kernel') end end describe '@initrd' do test 'should match filename on bootdisk' do assert_equal 'BOOT/EDIUM01_ZYHBD6OPET_INITRD_GZ', scope.instance_variable_get('@initrd') end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems