mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 23:02:43 +08:00
Revert "Rename all test files from JS -> ES6"
This reverts commit 2abe85b8344de1102c1589a9ac9421a8b296f2b5.
This commit is contained in:
@ -1,33 +0,0 @@
|
||||
import EmberObject from "@ember/object";
|
||||
moduleFor("controller:preferences/account");
|
||||
|
||||
QUnit.test("updating of associated accounts", function(assert) {
|
||||
const controller = this.subject({
|
||||
siteSettings: {
|
||||
enable_google_oauth2_logins: true
|
||||
},
|
||||
model: EmberObject.create({
|
||||
second_factor_enabled: true,
|
||||
is_anonymous: true
|
||||
}),
|
||||
site: EmberObject.create({
|
||||
isMobileDevice: false
|
||||
})
|
||||
});
|
||||
|
||||
controller.set("canCheckEmails", false);
|
||||
|
||||
assert.equal(controller.get("canUpdateAssociatedAccounts"), false);
|
||||
|
||||
controller.set("model.second_factor_enabled", false);
|
||||
|
||||
assert.equal(controller.get("canUpdateAssociatedAccounts"), false);
|
||||
|
||||
controller.set("model.is_anonymous", false);
|
||||
|
||||
assert.equal(controller.get("canUpdateAssociatedAccounts"), false);
|
||||
|
||||
controller.set("canCheckEmails", true);
|
||||
|
||||
assert.equal(controller.get("canUpdateAssociatedAccounts"), true);
|
||||
});
|
Reference in New Issue
Block a user