From 7ba0d29e0208cb3ff1980caa3da63dfdb52771e7 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 22 Feb 2016 19:50:58 +0100 Subject: [PATCH] [IMP] contract_recurring_invoicing_marker: Add more tests --- ...test_contract_recurring_invoicing_marker.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/contract_recurring_invoicing_marker/tests/test_contract_recurring_invoicing_marker.py b/contract_recurring_invoicing_marker/tests/test_contract_recurring_invoicing_marker.py index 607bb7db..c0c60506 100644 --- a/contract_recurring_invoicing_marker/tests/test_contract_recurring_invoicing_marker.py +++ b/contract_recurring_invoicing_marker/tests/test_contract_recurring_invoicing_marker.py @@ -31,9 +31,25 @@ class TestContractRecurringInvoicingMarker(common.TransactionCase): 'uom_id': self.uom.id})], }) - def test_invoice_with_marker(self): + def test_monthly_invoice_with_marker(self): self.contract.recurring_create_invoice() invoice = self.env['account.invoice'].search( [('partner_id', '=', self.partner.id)]) self.assertEqual( invoice.invoice_line[0].name, u'01/01/2016 - 01/31/2016') + + def test_daily_invoice_with_marker(self): + self.contract.recurring_rule_type = 'daily' + self.contract.recurring_create_invoice() + invoice = self.env['account.invoice'].search( + [('partner_id', '=', self.partner.id)]) + self.assertEqual( + invoice.invoice_line[0].name, u'01/01/2016 - 01/01/2016') + + def test_weekly_invoice_with_marker(self): + self.contract.recurring_rule_type = 'weekly' + self.contract.recurring_create_invoice() + invoice = self.env['account.invoice'].search( + [('partner_id', '=', self.partner.id)]) + self.assertEqual( + invoice.invoice_line[0].name, u'01/01/2016 - 01/07/2016')