mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 19:14:11 +08:00
FIX: Mentions updater should work regardless of .notify
This commit is contained in:
parent
041168c9b6
commit
53054b41d2
@ -3,7 +3,7 @@
|
||||
class GroupMentionsUpdater
|
||||
def self.update(current_name, previous_name)
|
||||
Post.where(
|
||||
"cooked LIKE '%class=\"mention-group\"%' AND raw LIKE :previous_name",
|
||||
"cooked LIKE '%class=\"mention-group%' AND raw LIKE :previous_name",
|
||||
previous_name: "%@#{previous_name}%"
|
||||
).find_in_batches do |posts|
|
||||
|
||||
|
@ -28,6 +28,7 @@ RSpec.describe GroupMentionsUpdater do
|
||||
group.update!(name: new_group_name)
|
||||
post.reload
|
||||
|
||||
puts post.raw
|
||||
expect(post.raw_mentions).to eq([new_group_name])
|
||||
expect(post.raw).to eq(expected_raw)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user