Commit a9682fe7 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Thomas Gambier

slapos_subscription_request: The link on the sent email is from the invoice

... not from the Payment Transaction

slapos_subscription_request: (test) Link on the email comes from the invoice
parent fd6c1f28
...@@ -30,5 +30,8 @@ if not context.SubscriptionRequest_verifyInstanceIsAllocated(): ...@@ -30,5 +30,8 @@ if not context.SubscriptionRequest_verifyInstanceIsAllocated():
# Only continue if instance is ready # Only continue if instance is ready
return return
if context.SubscriptionRequest_notifyPaymentIsReady(payment=first_period_payment): invoice = first_period_payment.getCausalityValue()
# Link to be sent is the invoice one
if context.SubscriptionRequest_notifyPaymentIsReady(payment=invoice):
context.confirm() context.confirm()
...@@ -351,7 +351,8 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin): ...@@ -351,7 +351,8 @@ class TestSlapOSSubscriptionScenarioMixin(DefaultScenarioMixin):
mail_message.getTitle()) mail_message.getTitle())
payment = subscription_request.SubscriptionRequest_verifyPaymentBalanceIsReady() payment = subscription_request.SubscriptionRequest_verifyPaymentBalanceIsReady()
self.assertEqual(payment.getSimulationState(), 'started') self.assertEqual(payment.getSimulationState(), 'started')
self.assertTrue(payment.getRelativeUrl() in \ invoice = payment.getCausalityValue()
self.assertTrue(invoice.getRelativeUrl() in \
mail_message.getTextContent()) mail_message.getTextContent())
self.assertTrue(subscription_request.getDestinationSectionTitle() in \ self.assertTrue(subscription_request.getDestinationSectionTitle() in \
mail_message.getTextContent()) mail_message.getTextContent())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment