Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: solidusio/solidus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e3b1fbfefea38bbb36fbd7ad2bc4454f68699fe0
Choose a base ref
..
head repository: solidusio/solidus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2abbf815ae6ee0b8edfa38ca012889ed25d743a5
Choose a head ref
Showing with 3 additions and 2 deletions.
  1. +1 −1 core/app/models/concerns/spree/user_address_book.rb
  2. +2 −1 core/spec/models/spree/concerns/user_address_book_spec.rb
2 changes: 1 addition & 1 deletion core/app/models/concerns/spree/user_address_book.rb
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ def default_user_address
def default_address=(address)
Spree::Deprecation.warn "This setter does not take into account Spree::Config.automatic_default_address and is deprecated. "\
"Please start using ship_address = address"
save_in_address_book(address.attributes, true) if address
self.ship_address = address if address
end

def default_address_attributes=(attributes)
3 changes: 2 additions & 1 deletion core/spec/models/spree/concerns/user_address_book_spec.rb
Original file line number Diff line number Diff line change
@@ -530,7 +530,8 @@ module Spree
"Please start using ship_address = address"
end

it "warns caller of deprecation" do
it "calls #ship_address= and warns caller of deprecation" do
expect(user).to receive(:ship_address=).with address
expect(Spree::Deprecation).to receive(:warn).with deprecation_message

user.default_address = address