mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 01:53:40 +08:00
628ba9d1e2
The main thrust of this PR is to take all the conditional checks based on the `enable_bookmarks_with_reminders` away and only keep the code from the `true` path, making bookmarks with reminders the core bookmarks feature. There is also a migration to create `Bookmark` records out of `PostAction` bookmarks for a site. ### Summary * Remove logic based on whether enable_bookmarks_with_reminders is true. This site setting is now obsolete, the old bookmark functionality is being removed. Retain the setting and set the value to `true` in a migration. * Use the code from the rake task to create a database migration that creates bookmarks from post actions. * Change the bookmark report to read from the new table. * Get rid of old endpoints for bookmarks * Link to the new bookmarks list from the user summary page
33 lines
928 B
JavaScript
33 lines
928 B
JavaScript
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({
|
|
id: 70,
|
|
second_factor_enabled: true,
|
|
is_anonymous: true
|
|
}),
|
|
currentUser: EmberObject.create({
|
|
id: 1234
|
|
}),
|
|
site: EmberObject.create({
|
|
isMobileDevice: 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("model.id", 1234);
|
|
assert.equal(controller.get("canUpdateAssociatedAccounts"), true);
|
|
});
|