mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
FIX: Improve bookmark modal on mobile and bookmark sync rake task (#9221)
* Improve the bookmark mobile on modal so it doesn't go all the way to the edge and the custom datetime input is easier to use * Improve the rake task for syncing so it does not error for topics that no longer exist and batches 2000 inserts at a time, clearing the array each time
This commit is contained in:
@ -43,6 +43,17 @@ RSpec.describe "bookmarks tasks" do
|
||||
expect(Bookmark.all.count).to eq(1)
|
||||
end
|
||||
|
||||
it "skips post actions where the post topic no longer exists and does not error" do
|
||||
post1.topic.delete
|
||||
post1.reload
|
||||
expect { invoke_task }.not_to raise_error
|
||||
end
|
||||
|
||||
it "skips post actions where the post no longer exists and does not error" do
|
||||
post1.delete
|
||||
expect { invoke_task }.not_to raise_error
|
||||
end
|
||||
|
||||
def create_post_actions_and_existing_bookmarks
|
||||
Fabricate(:post_action, user: user1, post: post1, post_action_type_id: PostActionType.types[:bookmark])
|
||||
Fabricate(:post_action, user: user2, post: post2, post_action_type_id: PostActionType.types[:bookmark])
|
||||
|
Reference in New Issue
Block a user