From 6a96603e200a481345d5fcc2951d2417a61af2fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 17 Jun 2008 16:40:07 +0000
Subject: [PATCH] tests that payment is copied when applying model

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21667 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testPayroll.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/product/ERP5/tests/testPayroll.py b/product/ERP5/tests/testPayroll.py
index b1757524b0..6be7a86ba3 100644
--- a/product/ERP5/tests/testPayroll.py
+++ b/product/ERP5/tests/testPayroll.py
@@ -1462,13 +1462,19 @@ class TestPayroll(TestPayrollMixin):
     employee = self.portal.person_module.newContent(
                       portal_type='Person',
                       title='Employee')
+    employee_bank_account = employee.newContent(
+                      portal_type='Bank Account')
     employer = self.portal.organisation_module.newContent(
                       portal_type='Organisation',
                       title='Employer')
+    employer_bank_account = employee.newContent(
+                      portal_type='Bank Account')
     model = self.portal.paysheet_model_module.newContent(
                       portal_type='Pay Sheet Model',
                       source_section_value=employee,
+                      source_payment_value=employee_bank_account,
                       destination_section_value=employer,
+                      destination_payment_value=employer_bank_account,
                       price_currency_value=eur,
                       payment_condition_payment_date=DateTime(2008, 1, 1),
                       work_time_annotation_line_quantity=10)
@@ -1479,6 +1485,8 @@ class TestPayroll(TestPayrollMixin):
     paysheet.PaySheetTransaction_applyModel()
     self.assertEquals(employee, paysheet.getSourceSectionValue())
     self.assertEquals(employer, paysheet.getDestinationSectionValue())
+    self.assertEquals(employee_bank_account, paysheet.getSourcePaymentValue())
+    self.assertEquals(employer_bank_account, paysheet.getDestinationPaymentValue())
     self.assertEquals(eur, paysheet.getResourceValue())
     self.assertEquals(eur, paysheet.getPriceCurrencyValue())
     self.assertEquals(DateTime(2008, 1, 1),
-- 
2.30.9