mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 00:33:31 +08:00
DEV: Fix some more flaky tests (#9384)
Includes: * DEV: Don't overwrite a computed property in test
This commit is contained in:
@ -7,27 +7,26 @@ QUnit.test("updating of associated accounts", function(assert) {
|
||||
enable_google_oauth2_logins: true
|
||||
},
|
||||
model: EmberObject.create({
|
||||
id: 70,
|
||||
second_factor_enabled: true,
|
||||
is_anonymous: true
|
||||
}),
|
||||
currentUser: EmberObject.create({
|
||||
id: 1234,
|
||||
}),
|
||||
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);
|
||||
|
||||
controller.set("model.id", 1234);
|
||||
assert.equal(controller.get("canUpdateAssociatedAccounts"), true);
|
||||
});
|
||||
|
Reference in New Issue
Block a user