[FIX] website_forum: ensure demo user have enough karma to post non-pending questions

This commit is contained in:
Christophe Simonis
2016-08-21 22:20:36 +02:00
parent fc44dcd019
commit 9d63b8d492
@@ -10,4 +10,9 @@ class TestUi(odoo.tests.HttpCase):
self.phantom_js("/", "odoo.__DEBUG__.services['web_tour.tour'].run('question')", "odoo.__DEBUG__.services['web_tour.tour'].tours.question", login="admin")
def test_02_demo_question(self):
with self.cursor() as test_cr:
env = self.env(cr=test_cr)
forum = env.ref('website_forum.forum_help')
demo = env.ref('base.user_demo')
demo.karma = forum.karma_post + 1
self.phantom_js("/", "odoo.__DEBUG__.services['web.Tour'].run('forum_question', 'test')", "odoo.__DEBUG__.services['web.Tour'].tours.forum_question", login="demo")