summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/testing_support
diff options
context:
space:
mode:
authorBrendan Deere <brendan@stembolt.com>2016-10-17 13:54:10 -0700
committerBrendan Deere <brendan@stembolt.com>2016-10-19 14:58:25 -0700
commit8026c42c282a7e10c41f774c701330455f01f8d9 (patch)
tree84da1d431693c9007136541e75421c13000a6e51 /lib/solidus_subscriptions/testing_support
parent6eff9142d8432464c813bce5747badab35d6bc8a (diff)
Installments no longer track their order directly
An order is generated with every attept to fulfill the installment. Each installment detail now has its own order
Diffstat (limited to 'lib/solidus_subscriptions/testing_support')
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/installment_factory.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb b/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb
index ced5886..281326e 100644
--- a/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/installment_factory.rb
@@ -9,8 +9,13 @@ FactoryGirl.define do
end
trait :success do
- order { create :completed_order_with_totals }
- details { build_list(:installment_detail, 1, :success, installment: @instance) }
+ transient do
+ order { create :completed_order_with_totals }
+ end
+
+ details do
+ build_list(:installment_detail, 1, :success, installment: @instance, order: order)
+ end
end
end
end