Skip to content

Commit fe56444

Browse files
committed
fix: LastOperatrionFailed error changed with ApiError
1 parent 5a6b2cb commit fe56444

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

spec/support/shared_examples/v3_service_binding_create.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'db_spec_helper'
1+
require 'spec_helper'
22
require 'services/service_brokers/v2/errors/service_broker_bad_response'
33
require 'services/service_brokers/v2/errors/service_broker_request_rejected'
44
require 'cloud_controller/http_request_error'
@@ -207,7 +207,7 @@ class BadError < StandardError; end
207207
let(:state) { 'failed' }
208208

209209
it 'updates the last operation' do
210-
expect { action.poll(binding) }.to raise_error(VCAP::CloudController::V3::LastOperationFailedState)
210+
expect { action.poll(binding) }.to raise_error(CloudController::Errors::ApiError)
211211

212212
binding.reload
213213
expect(binding.last_operation.state).to eq('failed')
@@ -371,7 +371,7 @@ class BadError < StandardError; end
371371
let(:state) { 'failed' }
372372

373373
it 'does not create an audit event' do
374-
expect { action.poll(binding) }.to raise_error(VCAP::CloudController::V3::LastOperationFailedState)
374+
expect { action.poll(binding) }.to raise_error(CloudController::Errors::ApiError)
375375

376376
expect(binding_event_repo).not_to have_received(:record_create)
377377
end

spec/support/shared_examples/v3_service_binding_delete.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class BadError < StandardError; end
255255
let(:state) { 'failed' }
256256

257257
it 'updates the last operation' do
258-
expect { action.poll(binding) }.to raise_error(VCAP::CloudController::V3::LastOperationFailedState)
258+
expect { action.poll(binding) }.to raise_error(CloudController::Errors::ApiError)
259259

260260
binding.reload
261261
expect(binding.last_operation.state).to eq('failed')

spec/unit/actions/service_credential_binding_delete_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ module V3
134134
let(:state) { 'failed' }
135135

136136
it 'does not create an audit event' do
137-
expect { action.poll(binding) }.to raise_error(VCAP::CloudController::V3::LastOperationFailedState)
137+
expect { action.poll(binding) }.to raise_error(CloudController::Errors::ApiError)
138138

139139
expect(klass.first).to eq(binding)
140140
expect(binding_event_repo).not_to have_received(:record_delete)

0 commit comments

Comments
 (0)