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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user