discourse/test/javascripts/controllers/preferences-account-test.js.es6

22 lines
564 B
Plaintext
Raw Normal View History

moduleFor("controller:preferences/account");
QUnit.test("updating of associated accounts", function(assert) {
const controller = this.subject({
siteSettings: {
enable_google_oauth2_logins: true
},
2019-01-12 00:54:23 +08:00
model: Ember.Object.create({
second_factor_enabled: true
}),
2019-01-12 00:54:23 +08:00
site: Ember.Object.create({
isMobileDevice: false
})
});
assert.equal(controller.get("canUpdateAssociatedAccounts"), false);
controller.set("model.second_factor_enabled", false);
assert.equal(controller.get("canUpdateAssociatedAccounts"), true);
});