summaryrefslogtreecommitdiff
path: root/spec/requests/products_controller
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/products_controller')
-rw-r--r--spec/requests/products_controller/create_spec.rb4
-rw-r--r--spec/requests/products_controller/update_spec.rb4
2 files changed, 4 insertions, 4 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
diff --git a/spec/requests/products_controller/update_spec.rb b/spec/requests/products_controller/update_spec.rb
index f916d6a..c84c5bd 100644
--- a/spec/requests/products_controller/update_spec.rb
+++ b/spec/requests/products_controller/update_spec.rb
@@ -19,8 +19,8 @@ RSpec.describe 'PUT /api/products/product_id', type: :request do
let(:route) { "/api/products/#{product.public_id}" }
let(:wrong_route) { "/api/products/#{SecureRandom.hex(8)}" }
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