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):
227
227
Sponsorship .APPLIED ,
228
228
Sponsorship .APPROVED ,
229
229
Sponsorship .REJECTED ,
230
+ Sponsorship .CANCELLED ,
230
231
]
231
232
for status in can_rollback_from :
232
233
sponsorship .status = status
@@ -301,6 +302,16 @@ def test_display_agreed_fee_for_approved_and_finalized_status(self):
301
302
302
303
self .assertEqual (sponsorship .agreed_fee , 2000 )
303
304
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
+
304
315
305
316
class SponsorshipCurrentYearTests (TestCase ):
306
317
You can’t perform that action at this time.
0 commit comments