chol
/
eva
forked from tohe/eva
1
0
Fork 0

added test for offboarding process

This commit is contained in:
Benni Bärmann 2021-11-10 09:40:36 +01:00
parent 4917d24fd5
commit 60debb6e86
1 changed files with 30 additions and 3 deletions

View File

@ -45,8 +45,8 @@ class LoginTestCase(TestCase):
self.assertContains(self.response, 'Programme', status_code=200) self.assertContains(self.response, 'Programme', status_code=200)
self.assertContains(self.response, 'Kommunikation und Events', status_code=200) self.assertContains(self.response, 'Kommunikation und Events', status_code=200)
def testWizzard(self): def test_wizzard_in(self):
''' this test goes through the whole process of the EvaFormView from start to end ''' ''' this test goes through the whole onboarding process of the EvaFormView from start to end '''
self.assertEqual(200, self.response.status_code) self.assertEqual(200, self.response.status_code)
@ -84,8 +84,35 @@ class LoginTestCase(TestCase):
'eva_form_view-current_step': '5', 'eva_form_view-current_step': '5',
}, DummyForm) }, DummyForm)
def test_wizzard_out(self):
''' this test goes through the whole offboarding process of the EvaFormView from start to end '''
self.assertEqual(200, self.response.status_code)
response = self._postform({
'eva_form_view-current_step': '0',
'0-firstname': 'Ara',
'0-lastname': 'Seva',
'0-department': 'CENT',
'0-choice': 'OUT'
}, OffboardingForm)
response = self._postform({
'eva_form_view-current_step': '1',
'1-firstdate_employment': '2021-01-01',
'1-firstdate_presence': '2021-01-01',
'1-jobdescription_german': 'hau drauf',
'1-jobdescription_english': 'und schluss',
'1-works_in_gs': False
}, DummyForm)
response = self._postform({
'eva_form_view-current_step': '5',
}, DummyForm)
def test_mail(self): def test_mail(self):
self.testWizzard() self.test_wizzard_in()
# print(mail.outbox) # print(mail.outbox)
self.assertGreater(len(mail.outbox), 2) self.assertGreater(len(mail.outbox), 2)
self.assertIn("Ara Seva", mail.outbox[0].subject) self.assertIn("Ara Seva", mail.outbox[0].subject)