You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With that format shared spec is implemented in the way when it checks just the successfulness of the Result:
context "when errors occur" do
it "returns the error result" do
error_params_list.each do |params|
quotation_result = supplier_client.quote(params)
expect(quotation_result).not_to be_success
expect(quotation_result.error).to_not be_nil
end
end
end
Which makes it hard to check for the existence of specific error.code and error.data. Currently we have to remove specific case from params_list and implement separate spec. Probably we can change error_params_list format to support for expected error.code and error.data:
let(:error_params_list) {
[
{ params: { ... }, code: :stay_too_short, data: "The minimum number of nights to book this apartment is 10" }
{ params: { ... }, code: :check_in_too_near, data: "Selected check-in date is too near" },
{ params: { ... }, code: :timeout, data: nil }
]
}
The text was updated successfully, but these errors were encountered:
Currently we have shared specs which define lists of params for different groups:
unavailable_params_list
,error_params_list
and so on. Example:With that format shared spec is implemented in the way when it checks just the successfulness of the
Result
:Which makes it hard to check for the existence of specific
error.code
anderror.data
. Currently we have to remove specific case fromparams_list
and implement separate spec. Probably we can changeerror_params_list
format to support for expectederror.code
anderror.data
:The text was updated successfully, but these errors were encountered: