REFACTOR: Removes `Discourse.SiteSettings` constant from tests
This does not work in the Ember CLI world.
This commit is contained in:
parent
a4356b99af
commit
4dec7d85d0
|
@ -101,7 +101,6 @@ const ORIGINAL_SETTINGS = {
|
||||||
};
|
};
|
||||||
|
|
||||||
let siteSettings = Object.assign({}, ORIGINAL_SETTINGS);
|
let siteSettings = Object.assign({}, ORIGINAL_SETTINGS);
|
||||||
Discourse.SiteSettings = siteSettings;
|
|
||||||
|
|
||||||
export function currentSettings() {
|
export function currentSettings() {
|
||||||
return siteSettings;
|
return siteSettings;
|
||||||
|
|
|
@ -45,8 +45,10 @@
|
||||||
//= require jquery.magnific-popup.min.js
|
//= require jquery.magnific-popup.min.js
|
||||||
|
|
||||||
let App = window.Discourse;
|
let App = window.Discourse;
|
||||||
let resetSettings = require("discourse/tests/helpers/site-settings")
|
let {
|
||||||
.resetSettings;
|
resetSettings,
|
||||||
|
currentSettings,
|
||||||
|
} = require("discourse/tests/helpers/site-settings");
|
||||||
let createHelperContext = require("discourse-common/lib/helpers")
|
let createHelperContext = require("discourse-common/lib/helpers")
|
||||||
.createHelperContext;
|
.createHelperContext;
|
||||||
|
|
||||||
|
@ -78,6 +80,7 @@ d.write(
|
||||||
App.rootElement = "#ember-testing";
|
App.rootElement = "#ember-testing";
|
||||||
App.setupForTesting();
|
App.setupForTesting();
|
||||||
App.injectTestHelpers();
|
App.injectTestHelpers();
|
||||||
|
App.SiteSettings = currentSettings();
|
||||||
App.start();
|
App.start();
|
||||||
|
|
||||||
// disable logster error reporting
|
// disable logster error reporting
|
||||||
|
|
Loading…
Reference in New Issue