diff options
| author | Jagdish Panchal (Open ERP) <jap@tinyerp.com> | 2011-12-08 11:45:46 +0530 |
|---|---|---|
| committer | Jagdish Panchal (Open ERP) <jap@tinyerp.com> | 2011-12-08 11:45:46 +0530 |
| commit | ae4fd210a117fe25da528ea90ac37c05a32a71c0 (patch) | |
| tree | 33882869d87f087f8a982e17395528e1aab5defb /addons/hr_expense/test/expense_process.yml | |
| parent | 201365e2d2ba971d31b06457a04cb840b1d00835 (diff) | |
[IMP] hr_expense: improve test case of expense process
bzr revid: jap@tinyerp.com-20111208061546-iuy49ixlowv4cxiz
Diffstat (limited to 'addons/hr_expense/test/expense_process.yml')
| -rw-r--r-- | addons/hr_expense/test/expense_process.yml | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/addons/hr_expense/test/expense_process.yml b/addons/hr_expense/test/expense_process.yml index 654b28bde5e..1c02e4b6f5c 100644 --- a/addons/hr_expense/test/expense_process.yml +++ b/addons/hr_expense/test/expense_process.yml @@ -1,25 +1,35 @@ - - In Order to test process of "Employee Expenses". + I test the process of "Employee Expenses" by processing the expenses of an employee for September month - - I confirm "Expense Bill of September" for one employee of Marketing Department. + I check that state is 'Draft'. +- + !assert {model: hr.expense.expense, id: sep_expenses, severity: error, string: Expense should be in Draft state}: + - state == 'draft' +- + I change the state. - !workflow {model: hr.expense.expense, action: confirm, ref: sep_expenses} - - I check state of expense after confirmed. + I check that state is 'Confirm'. - - !assert {model: hr.expense.expense, id: sep_expenses}: + !assert {model: hr.expense.expense, id: sep_expenses, severity: error, string: Expense should be in Confirm state}: - state == 'confirm' - - I accept this expense. + I approve the September expenses. - !workflow {model: hr.expense.expense, action: validate, ref: sep_expenses} - + I check that state is 'Approved' +- + !assert {model: hr.expense.expense, id: sep_expenses, severity: error, string: Expense should be in Approved state}: + - state == 'accepted' +- I make Invoice for the expense. - !python {model: hr.expense.expense}: | self.invoice(cr, uid, [ref('sep_expenses')]) - - I check invoice details after invoiced. + I check invoice details. - !python {model: hr.expense.expense}: | sep_expenses = self.browse(cr, uid, ref("sep_expenses"), context=context) @@ -31,17 +41,17 @@ assert sep_expenses.invoice_id.amount_total == sep_expenses.amount,"Invoice total amount is not correspond with supplier invoice total" assert len(sep_expenses.invoice_id.invoice_line) == len(sep_expenses.line_ids),"Lines of Invoice and supplier invoice Line are not correspond" - - I paid the expense. + I pay the expenses. - !python {model: hr.expense.expense}: | self.expense_paid(cr, uid, [ref('sep_expenses')]) - - I check the expense after paid. + I check that state of expenses is 'Paid'. - - !assert {model: hr.expense.expense, id: sep_expenses}: + !assert {model: hr.expense.expense, id: sep_expenses, severity: error, string: Expense should be in Paid state}: - state == 'paid' - - I print this expense. + I print a report of the expenses. - !python {model: hr.expense.expense}: | import netsvc, tools, os |
