summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Desantis <desa.alessandro@gmail.com>2020-10-05 11:01:35 +0200
committerAlessandro Desantis <desa.alessandro@gmail.com>2020-10-05 11:01:35 +0200
commitfa5876cca9cabd3cf78ae16809a19f3ebab4bfb9 (patch)
tree0d0076b62930d0180f76a02f3e2a9310334548f2
parentdb9fb4906c25dfb542d9784eeb07c45ee182c51b (diff)
Fix failing LineItem test
The subscription_repopulated event is now created with the details of the subscription, not of the line item that is causing the repopulation.
-rw-r--r--spec/models/solidus_subscriptions/line_item_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/solidus_subscriptions/line_item_spec.rb b/spec/models/solidus_subscriptions/line_item_spec.rb
index 163e701..5b93e03 100644
--- a/spec/models/solidus_subscriptions/line_item_spec.rb
+++ b/spec/models/solidus_subscriptions/line_item_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe SolidusSubscriptions::LineItem, type: :model do
expect(line_item.subscription.events.last).to have_attributes(
event_type: 'subscription_repopulated',
- details: a_hash_including('id' => line_item.id),
+ details: a_hash_including('id' => line_item.subscription.id),
)
end
end
@@ -29,7 +29,7 @@ RSpec.describe SolidusSubscriptions::LineItem, type: :model do
expect(line_item.subscription.events.last).to have_attributes(
event_type: 'subscription_repopulated',
- details: a_hash_including('id' => line_item.id),
+ details: a_hash_including('id' => line_item.subscription.id),
)
end
end
@@ -43,7 +43,7 @@ RSpec.describe SolidusSubscriptions::LineItem, type: :model do
expect(line_item.subscription.events.last).to have_attributes(
event_type: 'subscription_repopulated',
- details: a_hash_including('id' => line_item.id),
+ details: a_hash_including('id' => line_item.subscription.id),
)
end
end