From 4cea7b195771b80d6cbd775589f8efff828aa2e1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Tue, 14 Feb 2023 09:45:15 +0100 Subject: [PATCH] Improve error message, and use the same than the view --- config/locales/en.yml | 4 ++-- spec/models/spree/order_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 84158b1d46..c33177750a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -27,9 +27,9 @@ en: spree/shipping_method: Shipping Method attributes: spree/order/ship_address: - address1: "Shipping address line 1" + address1: "Shipping address (Street + House number)" address2: "Shipping address line 2" - city: "Shipping address suburb 1" + city: "Shipping address city" country: "Shipping address country" phone: "Phone number" firstname: "First name" diff --git a/spec/models/spree/order_spec.rb b/spec/models/spree/order_spec.rb index e42a7616c6..cce3536522 100644 --- a/spec/models/spree/order_spec.rb +++ b/spec/models/spree/order_spec.rb @@ -12,7 +12,7 @@ describe Spree::Order do it "provides friendly error messages" do order.ship_address = Spree::Address.new order.save - expect(order.errors.full_messages).to include "Shipping address line 1 can't be blank" + expect(order.errors.full_messages).to include "Shipping address (Street + House number) can't be blank" end it "provides friendly error messages for bill address" do