mirror of
https://github.com/discourse/discourse.git
synced 2025-06-19 22:23:04 +08:00
Remove Discourse.SiteSettings
from tests (#10193)
* Remove unused Discourse.SiteSettings * Remove `Discourse.SiteSettings` from many tests * REFACTOR: `lib:formatter` was using a lot of leaky state * Remove more `Discourse.SiteSettings` from tests * More SiteSettings removed from tests
This commit is contained in:
@ -10,8 +10,9 @@ import {
|
||||
htmlSafe
|
||||
} from "discourse/lib/computed";
|
||||
import { setPrefix } from "discourse-common/lib/get-url";
|
||||
import { discourseModule } from "helpers/qunit-helpers";
|
||||
|
||||
QUnit.module("lib:computed", {
|
||||
discourseModule("lib:computed", {
|
||||
beforeEach() {
|
||||
sandbox.stub(I18n, "t").callsFake(function(scope) {
|
||||
return "%@ translated: " + scope;
|
||||
@ -23,13 +24,13 @@ QUnit.module("lib:computed", {
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test("setting", assert => {
|
||||
QUnit.test("setting", function(assert) {
|
||||
var t = EmberObject.extend({
|
||||
vehicle: setting("vehicle"),
|
||||
missingProp: setting("madeUpThing")
|
||||
}).create();
|
||||
|
||||
Discourse.SiteSettings.vehicle = "airplane";
|
||||
this.siteSettings.vehicle = "airplane";
|
||||
assert.equal(
|
||||
t.get("vehicle"),
|
||||
"airplane",
|
||||
|
Reference in New Issue
Block a user