Make package spec work in rails 4 by persisting the test enterprises so that the copnnection between shipping methods and enterprises works

This commit is contained in:
Luis Ramos
2020-03-03 14:46:12 +00:00
parent 829a73c58d
commit 7fdaa0f0c7

View File

@@ -6,8 +6,8 @@ module Stock
subject(:package) { Package.new(stock_location, order, contents) }
let(:enterprise) { build(:enterprise) }
let(:other_enterprise) { build(:enterprise) }
let(:enterprise) { create(:enterprise) }
let(:other_enterprise) { create(:enterprise) }
let(:order) { build(:order, distributor: enterprise) }