File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ def test_rollback_sponsorship_to_edit(self):
227227 Sponsorship .APPLIED ,
228228 Sponsorship .APPROVED ,
229229 Sponsorship .REJECTED ,
230+ Sponsorship .CANCELLED ,
230231 ]
231232 for status in can_rollback_from :
232233 sponsorship .status = status
@@ -301,6 +302,16 @@ def test_display_agreed_fee_for_approved_and_finalized_status(self):
301302
302303 self .assertEqual (sponsorship .agreed_fee , 2000 )
303304
305+ def test_cancel_sponsorship (self ):
306+ sponsorship = Sponsorship .new (self .sponsor , self .benefits )
307+ sponsorship .status = Sponsorship .APPROVED
308+ sponsorship .save ()
309+
310+ sponsorship .cancel ()
311+
312+ self .assertEqual (sponsorship .status , Sponsorship .CANCELLED )
313+ self .assertIsNotNone (sponsorship .cancelled_on )
314+
304315
305316class SponsorshipCurrentYearTests (TestCase ):
306317
You can’t perform that action at this time.
0 commit comments