Fix: not detecting mentions when publishing saved drafts

The problem was that publishing a card with `#publish` was tracking the event
after updating the status, which was clearing the saved changes and preventing the
code from detecting the mention.

See:
https://app.fizzy.do/5986089/cards/2835
This commit is contained in:
Jorge Manrubia
2025-12-01 15:39:45 +01:00
parent 6fb7de88d7
commit 29d07e7326
4 changed files with 38 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ class MentionsTest < ActiveSupport::TestCase
card = Card.find(card.id)
assert_difference -> { Mention.count }, +1 do
card.published!
card.publish
end
end
end