Ignore:
Timestamp:
27 Jan 2015, 11:42:21 (10 years ago)
Author:
Henrik Bettermann
Message:

Fire transition when customer logs in for the first time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12500 r12517  
    500500        prmglobal.assignRoleToPrincipal('waeup.CustomerImpersonator', 'mrofficer')
    501501        prmglobal.assignRoleToPrincipal('waeup.CustomersManager', 'mrofficer')
     502        self.assertEqual(self.customer.state, 'created')
    502503        # Login as customer impersonator
    503504        self.browser.open(self.login_path)
     
    513514        self.assertMatches(
    514515            '...You successfully logged in as...', self.browser.contents)
     516        # Status has changed
     517        self.assertEqual(self.customer.state, 'started')
    515518        # We are logged in as customer and can see the 'My Data' tab
    516519        self.assertMatches(
     
    549552    def test_customer_change_password(self):
    550553        # Customers can change the password
     554        self.assertEqual(self.customer.state, 'created')
    551555        self.customer.personal_updated = datetime.utcnow()
    552556        self.browser.open(self.login_path)
     
    556560        self.assertEqual(self.browser.url, self.customer_path)
    557561        self.assertTrue('You logged in' in self.browser.contents)
     562        # Status has changed
     563        self.assertEqual(self.customer.state, 'started')
    558564        # Change password
    559565        self.browser.getLink("Change password").click()
     
    592598    def test_customer_upload_passport(self):
    593599        # Customer cant login if their password is not set
    594         IWorkflowInfo(self.customer).fireTransition('start')
    595600        self.browser.open(self.login_path)
    596601        self.browser.getControl(name="form.login").value = self.customer_id
Note: See TracChangeset for help on using the changeset viewer.