Following the https://jsonapi-suite.github.io/jsonapi_errorable/ documentation, it would be great to be able to verify automatically the presence of errors in the JSON response Suppose I have an error response like this ``` { "errors" => [ [0] { "code" => "unprocessable_entity", "status" => "422", "title" => "Validation Error", "detail" => "Billing_vat_number is not a valid european VAT number", "source" => { "pointer" => "/data/attributes/billing_vat_number" }, "meta" => { "attribute" => "billing_vat_number", "message" => "this is not a valid european VAT number" } } ] } ``` a nice Jsonapi spec matcher helper should let us write something like ```ruby expect(response).to have_jsonapi_errors([ 'billing_vat_number, :not_eu_vat' ]) ``` What do you think ?
Activity