Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolpiera committed Jun 27, 2024
1 parent ee8541a commit 26cd9df
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/test_poweremail_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,20 @@ def test_send_wizards_gets_default_priority_from_template(self):
'template_id': tmpl_id
})
wiz = send_obj.browse(cursor, uid, wiz_id)
self.assertEqual(wiz.priority, '2')
self.assertEqual(wiz.priority, '2')

def test_remove_action_reference(self):
tmpl_obj = self.openerp.pool.get('poweremail.templates')
cursor = self.cursor
uid = self.uid
tmpl_id = self.create_template()
template = tmpl_obj.browse(cursor, uid, tmpl_id)
template.create_action_reference({})
template = tmpl_obj.browse(cursor, uid, tmpl_id)
self.assertTrue(template.ref_ir_act_window)
self.assertTrue(template.ref_ir_value)
template = tmpl_obj.browse(cursor, uid, tmpl_id)

template.remove_action_reference({})
self.assertFalse(template.ref_ir_act_window)
self.assertFalse(template.ref_ir_value)

0 comments on commit 26cd9df

Please sign in to comment.