summaryrefslogtreecommitdiff
path: root/spec/requests/products_controller/create_spec.rb
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-04-04 17:55:20 -0600
committerHombreLaser <sebastian-440@live.com>2023-04-04 17:55:20 -0600
commitdb9b4b712271a67e60e6c0bf58c9ce510f177682 (patch)
tree791da60f29a1ac3b73efff46493d96c0116318e0 /spec/requests/products_controller/create_spec.rb
parent3afd35371caa0677fd2f66491bd337d1673013dc (diff)
Mejora presentaciĆ³n de mensajes de error
Diffstat (limited to 'spec/requests/products_controller/create_spec.rb')
-rw-r--r--spec/requests/products_controller/create_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/products_controller/create_spec.rb b/spec/requests/products_controller/create_spec.rb
index 400fd18..4d6a9bc 100644
--- a/spec/requests/products_controller/create_spec.rb
+++ b/spec/requests/products_controller/create_spec.rb
@@ -17,8 +17,8 @@ RSpec.describe 'POST /api/products', type: :request do
let(:headers) { { 'CONTENT_TYPE' => 'application/json', 'Authorization' => "Bearer #{token['token']}" } }
let(:route) { '/api/products' }
let(:expected_error_messages) do
- ["Name can't be blank", 'Unitary price must be greater than 0', 'Bulk price must be greater than 0',
- 'Available quantity must be greater than 0', 'Company must exist']
+ ["can't be blank", 'must be greater than 0', 'must be greater than 0',
+ 'must be greater than 0', 'must exist']
end
let(:desired_error_status) { 422 }
let(:expected_text) do