summaryrefslogtreecommitdiff
path: root/spec/requests/addresses_controller
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/addresses_controller')
-rw-r--r--spec/requests/addresses_controller/create_spec.rb3
-rw-r--r--spec/requests/addresses_controller/update_spec.rb4
2 files changed, 3 insertions, 4 deletions
diff --git a/spec/requests/addresses_controller/create_spec.rb b/spec/requests/addresses_controller/create_spec.rb
index befb80b..5987e0f 100644
--- a/spec/requests/addresses_controller/create_spec.rb
+++ b/spec/requests/addresses_controller/create_spec.rb
@@ -15,8 +15,7 @@ RSpec.describe 'POST /account/addresses', type: :request do
it_behaves_like 'a POST request' do
let(:route) { '/api/account/addresses' }
let(:expected_error_messages) do
- ["Number can't be blank", "Street can't be blank", "Zip code can't be blank",
- 'Country is invalid', "City can't be blank"]
+ ["can't be blank", "can't be blank", "can't be blank", 'is invalid', "can't be blank"]
end
let(:desired_error_status) { 422 }
let(:expected_text) { [address.number.to_s, address.zip_code.to_s, address.country, address.street, address.city] }
diff --git a/spec/requests/addresses_controller/update_spec.rb b/spec/requests/addresses_controller/update_spec.rb
index 0c3662e..a5b993a 100644
--- a/spec/requests/addresses_controller/update_spec.rb
+++ b/spec/requests/addresses_controller/update_spec.rb
@@ -21,8 +21,8 @@ RSpec.describe 'PUT /api/account/addresses', type: :request do
let(:route) { "/api/account/addresses/#{address.id}" }
let(:wrong_route) { "/api/account/addresses/#{SecureRandom.hex(8)}" }
let(:expected_error_messages) do
- ["Number can't be blank", "Street can't be blank", "Zip code can't be blank",
- 'Country is invalid', "City can't be blank"]
+ ["can't be blank", "can't be blank", "can't be blank",
+ 'is invalid', "can't be blank"]
end
let(:expected_text) do
[new_address.number.to_s, new_address.zip_code.to_s, new_address.country, new_address.street,