diff --git a/spec/unit/pool_manager_spec.rb b/spec/unit/pool_manager_spec.rb index 854c838..d89b82b 100644 --- a/spec/unit/pool_manager_spec.rb +++ b/spec/unit/pool_manager_spec.rb @@ -920,6 +920,22 @@ EOT end end + describe "#get_vm_host_info" do + before do + expect(subject).not_to be_nil + end + + let(:vm_object) { double('vm_object') } + let(:parent_host) { double('parent_host') } + + it 'should return an array with host information' do + expect(vm_object).to receive_message_chain(:summary, :runtime, :host).and_return(parent_host) + expect(parent_host).to receive(:name).and_return('vmhostname') + + expect(subject.get_vm_host_info(vm_object)).to eq([parent_host,'vmhostname']) + end + end + describe '#_check_pool' do let(:pool_helper) { double('pool') } let(:vsphere) { {pool => pool_helper} }