spec/unit/config_spec.rb in vagrant-libvirt-0.8.2 vs spec/unit/config_spec.rb in vagrant-libvirt-0.9.0
- old
+ new
@@ -628,9 +628,27 @@
expect(vm).to receive(:networks).and_return([[:public, { mac: 'aa/bb/cc/dd/ee/ff' }]])
assert_invalid
end
end
+ context 'with nvram defined' do
+ before do
+ subject.nvram = '/path/to/some/nvram'
+ end
+
+ it 'should be invalid as loader not set' do
+ assert_invalid
+ end
+
+ context 'with loader defined' do
+ it 'should be valid' do
+ subject.loader = '/path/to/some/loader'
+
+ assert_valid
+ end
+ end
+ end
+
context 'with cpu_mode and cpu_model defined' do
it 'should discard model if mode is passthrough' do
subject.cpu_mode = 'host-passthrough'
subject.cpu_model = 'qemu64'
assert_valid