Sha256: eb03eb00695b5fd0949572575cb1727c446c09fd2483b1447f24cf4ab6fe4f25
Contents?: true
Size: 727 Bytes
Versions: 15
Compression:
Stored size: 727 Bytes
Contents
require 'test_plugin_helper' class ForemanRhCloudSelfHostTest < ActiveSupport::TestCase setup do # reset cached value ForemanRhCloud.instance_variable_set(:@foreman_host, nil) end test 'finds host by fullname' do @domain @host = FactoryBot.create(:host, :managed) ForemanRhCloud.expects(:foreman_host_name).returns(@host.name) actual = ForemanRhCloud.foreman_host assert_not_nil actual end test 'finds host by shortname' do @host = FactoryBot.create(:host, :managed) Host.where(name: @host.name).update_all(name: @host.shortname) ForemanRhCloud.expects(:foreman_host_name).returns(@host.name) actual = ForemanRhCloud.foreman_host assert_not_nil actual end end
Version data entries
15 entries across 15 versions & 1 rubygems