DEV: Update JS test fixtures

DEV: Update JS test fixtures

  • site.json now returns a list of group objects, not a group_names array (a6714e25)
  • c/1/show.json now includes custom_fields: {}, even if no fields exist (b8bd0316)
diff --git a/test/javascripts/fixtures/category-fixtures.js.es6 b/test/javascripts/fixtures/category-fixtures.js.es6
index f77273da73..c8625b03f4 100644
--- a/test/javascripts/fixtures/category-fixtures.js.es6
+++ b/test/javascripts/fixtures/category-fixtures.js.es6
@@ -35,7 +35,8 @@ export default {
       position: 25,
       cannot_delete_reason:
         "Can't delete this category because it has 2030 topics. Oldest topic is <a href=\"https://localhost:3000/t/when-a-new-post-appears-in-a-topic-the-bookmark-isn-t-updated/39\">When a new post appears in a topic, the bookmark isn't updated</a>.",
-      allow_badges: true
+      allow_badges: true,
+      custom_fields: {}
     }
   }
 };
diff --git a/test/javascripts/fixtures/site-fixtures.js.es6 b/test/javascripts/fixtures/site-fixtures.js.es6
index 72712c317c..fc8934c1aa 100644
--- a/test/javascripts/fixtures/site-fixtures.js.es6
+++ b/test/javascripts/fixtures/site-fixtures.js.es6
@@ -13,23 +13,16 @@ export default {
         small_action: 3,
         whisper: 4
       },
-      group_names: [
-        "admins",
-        "discourse",
-        "everyone",
-        "mcneel",
-        "moderators",
-        "newrelic",
-        "plugin_authors",
-        "sitepoint",
-        "staff",
-        "translators",
-        "trust_level_0",
-        "trust_level_1",
-        "trust_level_2",
-        "trust_level_3",
-        "trust_level_4",
-        "ubuntu"
+      groups: [
+        { id: 1, name: "admins" },
+        { id: 2, name: "moderators" },
+        { id: 3, name: "staff" },
+        { id: 4, name: "custom_group" },
+        { id: 10, name: "trust_level_0" },
+        { id: 11, name: "trust_level_1" },
+        { id: 12, name: "trust_level_2" },
+        { id: 13, name: "trust_level_3" },
+        { id: 14, name: "trust_level_4" }
       ],
       filters: [
         "latest",

GitHub sha: 943d8e0a

1 Like