mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:44:40 +08:00
FIX: add excerpt fallback for chat message replies (#26834)
This commit is contained in:
@ -30,5 +30,10 @@ RSpec.describe Chat::InReplyToSerializer do
|
||||
it "censors words" do
|
||||
expect(serializer.as_json[:excerpt]).to eq("ok ■■■■■")
|
||||
end
|
||||
|
||||
it "builds an excerpt for replied to message if it doesn’t have one" do
|
||||
message.update!(excerpt: nil)
|
||||
expect(serializer.as_json[:excerpt]).to eq(message.build_excerpt)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user