[FIX] hr: fix failing signup test
The test `test_employee_create_from_signup` was failing when the module `auth_signup` was installed because of the missing partner. closes odoo/odoo#107243 X-original-commit: 2688f9bb00f9cb049ff11bbe4443adc66ee05941 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -152,10 +152,14 @@ class TestHrEmployee(TestHrCommon):
|
||||
|
||||
def test_employee_create_from_signup(self):
|
||||
# Test that an employee is not created when signin up on the website
|
||||
partner = self.env['res.partner'].create({
|
||||
'name': 'test partner'
|
||||
})
|
||||
self.env['res.users'].signup({
|
||||
'name': 'Test User',
|
||||
'login': 'test_user',
|
||||
'email': 'test_user@odoo.com',
|
||||
'password': 'test_user_password',
|
||||
'partner_id': partner.id,
|
||||
})
|
||||
self.assertFalse(self.env['res.users'].search([('login', '=', 'test_user')]).employee_id)
|
||||
|
||||
Reference in New Issue
Block a user