spec/resource_spec.rb in vmware-vra-1.5.4 vs spec/resource_spec.rb in vmware-vra-1.6.0
- old
+ new
@@ -90,14 +90,14 @@
end
end
end
describe '#fetch_resource_data' do
- it 'calls http_get! against the resources API endpoint' do
- expect(client).to receive(:http_get!)
+ it 'calls get_parsed against the resources API endpoint' do
+ expect(client).to receive(:get_parsed)
.with("/catalog-service/api/consumer/resources/#{resource_id}")
- .and_return('')
+ .and_return({})
Vra::Resource.new(client, id: resource_id)
end
end
@@ -354,10 +354,10 @@
end
describe '#submit_action_request' do
before do
allow(resource).to receive(:action_request_payload).and_return({})
- response = double('response', code: 200, headers: { location: '/requests/request-12345' })
+ response = double('response', location: '/requests/request-12345')
allow(client).to receive(:http_post).with('/catalog-service/api/consumer/requests', '{}').and_return(response)
end
it 'calls http_post' do
expect(client).to receive(:http_post).with('/catalog-service/api/consumer/requests', '{}')