REFACTOR: Removes `Discourse.SiteSettings` constant from tests

This does not work in the Ember CLI world.
This commit is contained in:
Robin Ward 2020-10-05 13:15:26 -04:00
parent a4356b99af
commit 4dec7d85d0
2 changed files with 5 additions and 3 deletions

View File

@ -101,7 +101,6 @@ const ORIGINAL_SETTINGS = {
};
let siteSettings = Object.assign({}, ORIGINAL_SETTINGS);
Discourse.SiteSettings = siteSettings;
export function currentSettings() {
return siteSettings;

View File

@ -45,8 +45,10 @@
//= require jquery.magnific-popup.min.js
let App = window.Discourse;
let resetSettings = require("discourse/tests/helpers/site-settings")
.resetSettings;
let {
resetSettings,
currentSettings,
} = require("discourse/tests/helpers/site-settings");
let createHelperContext = require("discourse-common/lib/helpers")
.createHelperContext;
@ -78,6 +80,7 @@ d.write(
App.rootElement = "#ember-testing";
App.setupForTesting();
App.injectTestHelpers();
App.SiteSettings = currentSettings();
App.start();
// disable logster error reporting