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);
|
||||
Discourse.SiteSettings = siteSettings;
|
||||
|
||||
export function currentSettings() {
|
||||
return siteSettings;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue