Commit 6a96603e authored by Jérome Perrin's avatar Jérome Perrin

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
parent 8e2c3a67
......@@ -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),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment