File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7676 it "rejects empty company_name" do
7777 post "/api/v1/customers/upsert" , params : empty_params . to_json , headers : headers
7878 expect ( response ) . to have_http_status ( :unprocessable_entity )
79- expect ( json_response [ "errors" ] ) . to include ( " Company name can't be blank")
79+ expect ( json_response [ "errors" ] ) . to include ( { "company_name" => [ " Company name can't be blank"] } )
8080 end
8181
8282 it "rejects whitespace-only company_name" do
8383 post "/api/v1/customers/upsert" , params : whitespace_params . to_json , headers : headers
8484 expect ( response ) . to have_http_status ( :unprocessable_entity )
85- expect ( json_response [ "errors" ] ) . to include ( " Company name can't be blank")
85+ expect ( json_response [ "errors" ] ) . to include ( { "company_name" => [ " Company name can't be blank"] } )
8686 end
8787 end
8888
You can’t perform that action at this time.
0 commit comments