Adds test for e-mails being sent when invoices are generated.
This commit is contained in:
		
							parent
							
								
									e946af0f04
								
							
						
					
					
						commit
						924906d38c
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -533,3 +533,11 @@ class InvoiceTestCase(RegistrationCartTestCase): | ||||||
|         # Now that we don't have CAT_1, we can't checkout this cart |         # Now that we don't have CAT_1, we can't checkout this cart | ||||||
|         with self.assertRaises(ValidationError): |         with self.assertRaises(ValidationError): | ||||||
|             invoice = TestingInvoiceController.for_cart(cart.cart) |             invoice = TestingInvoiceController.for_cart(cart.cart) | ||||||
|  | 
 | ||||||
|  |     def test_sends_email_on_invoice_creation(self): | ||||||
|  |         invoice = self._invoice_containing_prod_1(1) | ||||||
|  |         assert(1, len(self.emails)) | ||||||
|  |         email = self.emails[0] | ||||||
|  |         self.assertEquals(self.USER_1.email, email["to"]) | ||||||
|  |         self.assertEquals("invoice_created", email["kind"]) | ||||||
|  |         self.assertEquals(invoice.invoice, email["context"]["invoice"]) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Christopher Neugebauer
						Christopher Neugebauer