Ignore:
Timestamp:
15 Jun 2015, 14:35:38 (9 years ago)
Author:
Henrik Bettermann
Message:

Clear already booked bed if student used an ac twice or isn't the owner of the ac. I found this bug when writing the documentation.

File:
1 edited

Legend:

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

    r13047 r13050  
    30063006        self.assertMatches('...Activation Code:...',
    30073007                           self.browser.contents)
    3008         # Student can't used faked ACs ...
     3008        # Student can't use faked ACs ...
    30093009        self.browser.getControl(name="ac_series").value = u'nonsense'
    30103010        self.browser.getControl(name="ac_number").value = sfenumber
     
    30193019        self.assertMatches('...You are not the owner of this access code...',
    30203020                           self.browser.contents)
     3021        # The bed remains empty
     3022        bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
     3023        self.assertTrue(bed.owner == NOT_OCCUPIED)
    30213024        ac.owner = self.student_id
    30223025        self.browser.getControl(name="ac_series").value = sfeseries
     
    30263029                           self.browser.contents)
    30273030        # Bed has been allocated
    3028         bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
    30293031        self.assertTrue(bed.owner == self.student_id)
    30303032        # BedTicketAddPage is now blocked
Note: See TracChangeset for help on using the changeset viewer.