diff --git a/backend/spec/controllers/spree/admin/payments_controller_spec.rb b/backend/spec/controllers/spree/admin/payments_controller_spec.rb index 64718d42aea..dd592b5694c 100644 --- a/backend/spec/controllers/spree/admin/payments_controller_spec.rb +++ b/backend/spec/controllers/spree/admin/payments_controller_spec.rb @@ -54,7 +54,6 @@ module Admin let(:address_attributes) do { 'firstname' => address.firstname, - 'lastname' => address.lastname, 'address1' => address.address1, 'city' => address.city, 'country_id' => address.country_id, diff --git a/core/app/models/spree/address.rb b/core/app/models/spree/address.rb index c5b31172f46..490c25fecb1 100644 --- a/core/app/models/spree/address.rb +++ b/core/app/models/spree/address.rb @@ -11,7 +11,7 @@ class Address < Spree::Base belongs_to :country, class_name: "Spree::Country" belongs_to :state, class_name: "Spree::State" - validates :firstname, :lastname, :address1, :city, :country_id, presence: true + validates :firstname, :address1, :city, :country_id, presence: true validates :zipcode, presence: true, if: :require_zipcode? validates :phone, presence: true, if: :require_phone? diff --git a/core/lib/spree/testing_support/factories/address_factory.rb b/core/lib/spree/testing_support/factories/address_factory.rb index 775b3da6672..b80711e05d2 100644 --- a/core/lib/spree/testing_support/factories/address_factory.rb +++ b/core/lib/spree/testing_support/factories/address_factory.rb @@ -11,7 +11,7 @@ end firstname 'John' - lastname 'Doe' + lastname nil company 'Company' address1 '10 Lovely Street' address2 'Northwest'