From b1bbcb2415560d8163724c03a70af33d1bbd405f Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 11 Nov 2020 15:34:20 +0100 Subject: [PATCH] DEV: Use topic property setter --- .../tests/integration/widgets/topic-admin-menu-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/tests/integration/widgets/topic-admin-menu-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/topic-admin-menu-test.js index db272902410..a3c1b3b29c4 100644 --- a/app/assets/javascripts/discourse/tests/integration/widgets/topic-admin-menu-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/topic-admin-menu-test.js @@ -37,7 +37,7 @@ widgetTest("topic-admin-menu-button is present for admin/moderators", { id: 123, }); const topic = Topic.create({ user_id: this.currentUser.id }); - topic.category = Category.create({ read_restricted: true }); + topic.set("category_id", Category.create({ read_restricted: true }).id); this.siteSettings.allow_featured_topic_on_user_profiles = true; this.set("args", createArgs(topic)); }, @@ -59,7 +59,7 @@ widgetTest( id: 123, }); const topic = Topic.create({ user_id: this.currentUser.id }); - topic.category = Category.create({ read_restricted: true }); + topic.set("category_id", Category.create({ read_restricted: true }).id); this.siteSettings.allow_featured_topic_on_user_profiles = true; this.set("args", createArgs(topic)); },