Project

General

Profile

« Previous | Next » 

Revision 04327448

Added by Dominik Hlavac Duran about 5 years ago

Fixes #16520 - Associating VM-mac is case sensitive

View differences:

test/models/compute_resource_test.rb
assert_equal host, as_admin { cr.send(:associate_by, 'mac', '00:22:33:44:55:1a') }
end
test "#associate_by returns host by MAC attribute with upper case MAC" do
host = FactoryBot.create(:host, :mac => '00:22:33:44:C8:1A')
cr = FactoryBot.build_stubbed(:compute_resource)
assert_equal host, as_admin { cr.send(:associate_by, 'mac', '00:22:33:44:c8:1a') }
end
test "#associated_by returns read/write host" do
FactoryBot.create(:host, :mac => '00:22:33:44:55:1a')
cr = FactoryBot.build_stubbed(:compute_resource)

Also available in: Unified diff