2018-09-04 08:42:39 +08:00
|
|
|
moduleFor("controller:preferences/account");
|
|
|
|
|
2019-02-26 23:49:29 +08:00
|
|
|
QUnit.skip("updating of associated accounts", function(assert) {
|
2018-09-04 08:42:39 +08:00
|
|
|
const controller = this.subject({
|
|
|
|
siteSettings: {
|
|
|
|
enable_google_oauth2_logins: true
|
|
|
|
},
|
2019-01-12 00:54:23 +08:00
|
|
|
model: Ember.Object.create({
|
2018-09-04 08:42:39 +08:00
|
|
|
second_factor_enabled: true
|
|
|
|
}),
|
2019-01-12 00:54:23 +08:00
|
|
|
site: Ember.Object.create({
|
2018-09-04 08:42:39 +08:00
|
|
|
isMobileDevice: false
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
2019-02-26 23:49:29 +08:00
|
|
|
controller.set("canCheckEmails", false);
|
|
|
|
|
2018-09-04 08:42:39 +08:00
|
|
|
assert.equal(controller.get("canUpdateAssociatedAccounts"), false);
|
|
|
|
|
|
|
|
controller.set("model.second_factor_enabled", false);
|
|
|
|
|
2019-02-26 16:19:27 +08:00
|
|
|
assert.equal(controller.get("canUpdateAssociatedAccounts"), false);
|
|
|
|
|
2019-02-26 23:49:29 +08:00
|
|
|
controller.set("canCheckEmails", true);
|
2019-02-26 16:19:27 +08:00
|
|
|
|
2018-09-04 08:42:39 +08:00
|
|
|
assert.equal(controller.get("canUpdateAssociatedAccounts"), true);
|
|
|
|
});
|