spec/vra_spec.rb in kitchen-vra-2.6.0 vs spec/vra_spec.rb in kitchen-vra-2.7.0
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
#
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
# Copyright:: Copyright (c) 2015 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
@@ -397,11 +398,11 @@
let(:catalog) { double('catalog') }
before do
allow(driver).to receive(:vra_client).and_return(vra_client)
allow(vra_client).to receive(:catalog).and_return(catalog)
allow(catalog).to receive(:request).and_return(catalog_request)
- [ :cpus=, :memory=, :requested_for=, :lease_days=, :notes=, :subtenant_id=, :set_parameter ].each do |method|
+ %i[cpus= memory= requested_for= lease_days= notes= subtenant_id= set_parameter].each do |method|
allow(catalog_request).to receive(method)
end
end
it 'creates a catalog_request' do
@@ -455,11 +456,11 @@
'key2' => { type: 'integer', value: 123 } }
}
end
it 'sets extra parmeters' do
- expect(catalog_request).to receive(:set_parameter).with('key1', 'string', 'value1')
- expect(catalog_request).to receive(:set_parameter).with('key2', 'integer', 123)
+ expect(catalog_request).to receive(:set_parameters).with('key1', type: 'string', value: 'value1')
+ expect(catalog_request).to receive(:set_parameters).with('key2', type: 'integer', value: 123)
driver.catalog_request
end
end
end