stages/email: Add test to check if user is pending

This commit is contained in:
Jens Langhammer 2020-06-03 21:00:04 +02:00
parent f4be007803
commit 790139f8bc
1 changed files with 13 additions and 0 deletions

View File

@ -45,6 +45,19 @@ class TestEmailStage(TestCase):
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
def test_without_user(self):
"""Test without pending user"""
plan = FlowPlan(flow_pk=self.flow.pk.hex, stages=[self.stage])
session = self.client.session
session[SESSION_KEY_PLAN] = plan
session.save()
url = reverse(
"passbook_flows:flow-executor", kwargs={"flow_slug": self.flow.slug}
)
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
def test_pending_user(self):
"""Test with pending user"""
plan = FlowPlan(flow_pk=self.flow.pk.hex, stages=[self.stage])