Skip to content

Commit

Permalink
create stock location that passes validations
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorganIO authored and peterberkenbosch committed Aug 30, 2014
1 parent e9aecb3 commit 129078e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sample/db/samples/stock.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Spree::Sample.load_sample("variants")

location = Spree::StockLocation.first_or_create! name: 'default'
country = Spree::Country.find_by(iso: 'US')
location = Spree::StockLocation.first_or_create! name: 'default', address1: 'Example Street', city: 'City', zipcode: '12345', country: country, state: country.states.first
location.active = true
location.country = Spree::Country.where(iso: 'US').first
location.save!

Spree::Variant.all.each do |variant|
Expand Down

0 comments on commit 129078e

Please sign in to comment.