diff --git a/spec/models/mixins/inter_region_api_method_relay_spec.rb b/spec/models/mixins/inter_region_api_method_relay_spec.rb index 4fb538fbfce1..b163779d9f31 100644 --- a/spec/models/mixins/inter_region_api_method_relay_spec.rb +++ b/spec/models/mixins/inter_region_api_method_relay_spec.rb @@ -228,6 +228,13 @@ def expect_api_call(expected_action, expected_args = nil) }.to raise_error(described_class::InterRegionApiMethodRelayError) end + it "accepts Hash object as api result" do + expect(api_collection).to receive(action).and_return({}) + expect { + described_class.exec_api_call(region, collection_name, action) + }.not_to raise_error(described_class::InterRegionApiMethodRelayError) + end + it "calls the given action with the given args" do args = {:my => "args", :here => 123} expect(api_collection).to receive(action).with(args).and_return(api_success_result)