# Possibly already created by a migration.
unless Spree::Store.where(code: 'spree').exists?
  Spree::Store.new do |s|
    s.code              = 'spree'
    s.name              = 'Spree Demo Site'
    s.url               = 'demo.spreecommerce.com'
    s.mail_from_address = 'spree@example.com'
  end.save!
end

# Possibly already created by a migration.
unless Spree::Store.where(code: 'spree').exists?
  Spree::Store.new do |s|
    s.code              = 'spree'
    s.name              = 'Spree Demo Site'
    s.url               = 'demo.spreecommerce.com'
    s.mail_from_address = 'spree@example.com'
    s.cart_tax_country_iso = Spree::Config.admin_vat_location
  end.save!
end

Initialize the demo store with a sensible default tax country column
Initialize the demo store with a sensible default tax country column

The current default behaviour in Solidus is one setting for two
behaviour changes: What taxes are included in the prices in the backend,
and how carts without a shipping address are taxed.

While doing the work in separating the two settings, it does make sense for
most shops to have both be equal. This just sets the `cart_tax_country_iso`
for a new store to be equal to the Spree::Config for the backend prices.
