Ignore:
Timestamp:
8 Nov 2011, 06:21:19 (13 years ago)
Author:
Henrik Bettermann
Message:

The same payment ticket (with same p_item, p_session and p_category) must not be added twice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py

    r7024 r7025  
    685685    def test_manage_payments(self):
    686686        # Managers can add online school fee payment tickets
     687        # if certain requirements are met
    687688        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    688689        self.browser.open(self.payments_student_path)
     
    698699                           self.browser.contents)
    699700        payment_url = self.browser.url
     701
     702        # The same payment ticket (with same p_item, p_session and p_category)
     703        # can't be added twice.
     704        self.browser.open(self.payments_student_path)
     705        self.browser.getControl("Add online payment ticket").click()
     706        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     707        self.browser.getControl("Create ticket").click()
     708        self.assertMatches('...This payment ticket already exists...',
     709                           self.browser.contents)
     710
    700711        # Managers can open the callback view which simulates a valid callback
    701712        self.assertEqual(len(self.app['accesscodes']['SFE-0']),0)
Note: See TracChangeset for help on using the changeset viewer.