From db9b4b712271a67e60e6c0bf58c9ce510f177682 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 4 Apr 2023 17:55:20 -0600 Subject: Mejora presentaciĆ³n de mensajes de error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/requests/companies_controller/create_spec.rb | 2 +- spec/requests/companies_controller/update_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/requests/companies_controller') 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 -- cgit v1.2.3