Skip to content

Commit

Permalink
fix: Job offer is mandatory for employee onboarding (#22791)
Browse files Browse the repository at this point in the history
  • Loading branch information
nabinhait authored Jul 23, 2020
1 parent 3c8c346 commit 8712ac6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@
from frappe.utils import nowdate
from erpnext.hr.doctype.employee_onboarding.employee_onboarding import make_employee
from erpnext.hr.doctype.employee_onboarding.employee_onboarding import IncompleteTaskError
from erpnext.hr.doctype.job_offer.test_job_offer import create_job_offer

class TestEmployeeOnboarding(unittest.TestCase):
def test_employee_onboarding_incomplete_task(self):
if frappe.db.exists('Employee Onboarding', {'employee_name': 'Test Researcher'}):
frappe.delete_doc('Employee Onboarding', {'employee_name': 'Test Researcher'})
_set_up()
applicant = get_job_applicant()

job_offer = create_job_offer(job_applicant=applicant.name)
job_offer.submit()

onboarding = frappe.new_doc('Employee Onboarding')
onboarding.job_applicant = applicant.name
onboarding.job_offer = job_offer.name
onboarding.company = '_Test Company'
onboarding.designation = 'Researcher'
onboarding.append('activities', {
Expand Down

0 comments on commit 8712ac6

Please sign in to comment.