discourse/test/javascripts/controllers/preferences-account-test.js.es6
Sam 3748d3e281 UX: hide associate accounts if second factor is enabled
Once second factor is enabled all login via associated accounts is banned
showing this section just leads to confusion
2018-09-04 10:42:39 +10:00

22 lines
558 B
JavaScript

moduleFor("controller:preferences/account");
QUnit.test("updating of associated accounts", function(assert) {
const controller = this.subject({
siteSettings: {
enable_google_oauth2_logins: true
},
model: Em.Object.create({
second_factor_enabled: true
}),
site: Em.Object.create({
isMobileDevice: false
})
});
assert.equal(controller.get("canUpdateAssociatedAccounts"), false);
controller.set("model.second_factor_enabled", false);
assert.equal(controller.get("canUpdateAssociatedAccounts"), true);
});