mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Promote bookmarks with reminders to core functionality (#9369)
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
This commit is contained in:
@@ -254,11 +254,7 @@ describe PostSerializer do
|
||||
context "when a Bookmark record exists for the user on the post" do
|
||||
let!(:bookmark) { Fabricate(:bookmark_next_business_day_reminder, user: current_user, post: post) }
|
||||
|
||||
context "when the site setting for bookmarks with reminders is enabled" do
|
||||
before do
|
||||
SiteSetting.enable_bookmarks_with_reminders = true
|
||||
end
|
||||
|
||||
context "bookmarks with reminders" do
|
||||
it "returns true" do
|
||||
expect(serialized.as_json[:bookmarked_with_reminder]).to eq(true)
|
||||
end
|
||||
@@ -275,16 +271,6 @@ describe PostSerializer do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when the site setting for bookmarks with reminders is disabled" do
|
||||
it "does not return the bookmarked_with_reminder attribute" do
|
||||
expect(serialized.as_json.key?(:bookmarked_with_reminder)).to eq(false)
|
||||
end
|
||||
|
||||
it "does not return the bookmark_reminder_at attribute" do
|
||||
expect(serialized.as_json.key?(:bookmark_reminder_at)).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user