diff options
author | HombreLaser <sebastian-440@live.com> | 2023-04-04 17:55:20 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-04-04 17:55:20 -0600 |
commit | db9b4b712271a67e60e6c0bf58c9ce510f177682 (patch) | |
tree | 791da60f29a1ac3b73efff46493d96c0116318e0 /spec/requests/companies_controller | |
parent | 3afd35371caa0677fd2f66491bd337d1673013dc (diff) |
Mejora presentaciĆ³n de mensajes de error
Diffstat (limited to 'spec/requests/companies_controller')
-rw-r--r-- | spec/requests/companies_controller/create_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/companies_controller/update_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/companies_controller/create_spec.rb b/spec/requests/companies_controller/create_spec.rb index 219868b..74a448a 100644 --- a/spec/requests/companies_controller/create_spec.rb +++ b/spec/requests/companies_controller/create_spec.rb @@ -12,7 +12,7 @@ RSpec.describe 'POST /api/companies', type: :request do let(:headers) { { 'CONTENT_TYPE' => 'application/json', 'Authorization' => "Bearer #{token['token']}" } } let(:route) { '/api/companies' } let(:expected_error_messages) do - ["Name can't be blank", "Short name can't be blank", "Country can't be blank"] + ["can't be blank", "can't be blank", "can't be blank"] end let(:desired_error_status) { 422 } let(:expected_text) { [company.name, company.short_name, company.country, 'logo', 'http'] } diff --git a/spec/requests/companies_controller/update_spec.rb b/spec/requests/companies_controller/update_spec.rb index fd23365..de8cb2a 100644 --- a/spec/requests/companies_controller/update_spec.rb +++ b/spec/requests/companies_controller/update_spec.rb @@ -14,7 +14,7 @@ RSpec.describe 'PUT /api/companies/company_id', type: :request do let(:route) { "/api/companies/#{company.short_name}" } let(:wrong_route) { "/api/companies/#{SecureRandom.hex(8)}" } let(:expected_error_messages) do - ["Name can't be blank", "Short name can't be blank", "Country can't be blank"] + ["can't be blank", "can't be blank", "can't be blank"] end let(:expected_text) { [new_company.name, new_company.short_name, new_company.country, 'logo', 'http'] } let(:params) do |