[IMP] hr_expense : Improved the test cases.
bzr revid: mdi@tinyerp.com-20120717113803-paf83b5fm69p6d7w
This commit is contained in:
parent
bb7df4dcc5
commit
b943af3fe9
|
@ -19,14 +19,14 @@
|
|||
-
|
||||
I make Receipt for the expense.
|
||||
-
|
||||
!python {model: hr.expense.expense}: |
|
||||
self.action_receipt_create(cr, uid, [ref('sep_expenses')])
|
||||
!workflow {model: hr.expense.expense, action: done, ref: sep_expenses}
|
||||
-
|
||||
I check receipt details.
|
||||
-
|
||||
!python {model: hr.expense.expense}: |
|
||||
sep_expenses = self.browse(cr, uid, ref("sep_expenses"), context=context)
|
||||
assert sep_expenses.state == 'done', "Expense should be in 'Done' state."
|
||||
assert sep_expenses.voucher_id, "Expense should have link of Purchase Receipt."
|
||||
assert sep_expenses.voucher_id.name == sep_expenses.name,"Receipt name is not correspond with expense name."
|
||||
assert sep_expenses.voucher_id.type == 'purchase', "Receipt type is not purchase receipt."
|
||||
assert sep_expenses.voucher_id.amount == sep_expenses.amount,"Receipt total amount is not correspond with expense total."
|
||||
|
|
Loading…
Reference in New Issue