summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBrendan Deere <brendan.g.deere@gmail.com>2016-12-21 14:14:24 -0800
committerBrendan Deere <brendan@stembolt.com>2017-01-06 14:35:58 -0800
commit592462ae482ca17bbdfcfe19907a1fe53e9fbad3 (patch)
tree2569d56086501db7e70181cc9b6dc3c6e60ffa84 /spec
parent54803d475261fcf1af593b92f1df0af837c65c7b (diff)
Associate stores to subscriptions on creation
When subscriptions are created we should associate the store they were purchased from to the subscription. This will be used when generating subscription orders.
Diffstat (limited to 'spec')
-rw-r--r--spec/models/solidus_subscriptions/subscription_generator_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/models/solidus_subscriptions/subscription_generator_spec.rb b/spec/models/solidus_subscriptions/subscription_generator_spec.rb
index af5abb4..5e031e0 100644
--- a/spec/models/solidus_subscriptions/subscription_generator_spec.rb
+++ b/spec/models/solidus_subscriptions/subscription_generator_spec.rb
@@ -7,6 +7,7 @@ RSpec.describe SolidusSubscriptions::SubscriptionGenerator do
let(:subscription_line_items) { build_list :subscription_line_item, 1 }
let(:subscription_line_item) { subscription_line_items.first }
let(:user) { subscription_line_items.first.order.user }
+ let(:store) { subscription_line_items.first.order.store }
it { is_expected.to be_a Array }
@@ -20,7 +21,8 @@ RSpec.describe SolidusSubscriptions::SubscriptionGenerator do
subscription = subject.first
expect(subscription).to have_attributes(
user: user,
- line_item: subscription_line_item
+ line_item: subscription_line_item,
+ store: store
)
end
end