Project

General

Profile

« Previous | Next » 

Revision e52bc50f

Added by Adam Ruzicka about 8 years ago

Fixes #14330 - Provide option in hammer to change display type for
libvirt compute resource

View differences:

test/unit/compute_resources/libvirt_test.rb
assert_equal nil, attrs[:memory]
end
end
describe '#display_type' do
let(:cr) { FactoryGirl.build(:libvirt_cr) }
test "default display type is 'vnc'" do
assert_nil cr.attrs[:display]
assert_equal 'vnc', cr.display_type
end
test "display type can be set" do
expected = 'spice'
cr.display_type = 'SPICE'
assert_equal expected, cr.attrs[:display]
assert_equal expected, cr.display_type
assert cr.valid?
end
test "don't allow wrong display type to be set" do
cr.display_type = 'teletype'
refute cr.valid?
end
end
end

Also available in: Unified diff