From 20108f834c8b08d5da30bd6c8a2b2290a00d7fdc Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 11 Nov 2020 11:45:17 +0100 Subject: [PATCH] DEV: Don't overwrite computed props in tests --- .../select-kit/category-chooser-test.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js index 7f722fb5a6..2327492ed7 100644 --- a/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js +++ b/app/assets/javascripts/discourse/tests/integration/components/select-kit/category-chooser-test.js @@ -168,22 +168,15 @@ componentTest("filter works with non english characters", { template: ` {{category-chooser value=value - content=content }} `, beforeEach() { const store = createStore(); - const nonEnglishCat = store.createRecord("category", { + store.createRecord("category", { id: 1, name: "chữ Quốc ngữ", }); - const englishCat = store.createRecord("category", { - id: 2, - name: "Baz", - }); - - this.set("content", [nonEnglishCat, englishCat]); }, async test(assert) { @@ -199,19 +192,17 @@ componentTest("decodes entities in row title", { template: ` {{category-chooser value=value - content=content + options=(hash scopedCategoryId=1) }} `, beforeEach() { const store = createStore(); - const catWithEntities = store.createRecord("category", { + store.createRecord("category", { id: 1, name: "cat-with-entities", description: "baz "bar ‘foo’", }); - - this.set("content", [catWithEntities]); }, async test(assert) {