Fix: extract mentions when publishing cards
This wasn't working when creation and publishing happened on separated instances of the same record, which is what happens when you edit a draft and then you publish it https://app.fizzy.do/5986089/cards/2835/edit
This commit is contained in:
@@ -20,6 +20,8 @@ class MentionsTest < ActiveSupport::TestCase
|
||||
boards(:writebook).cards.create title: "Cleanup", description: "Did you finish up with the cleanup, @david?"
|
||||
end
|
||||
|
||||
card = Card.find(card.id)
|
||||
|
||||
assert_difference -> { Mention.count }, +1 do
|
||||
card.published!
|
||||
end
|
||||
@@ -33,6 +35,8 @@ class MentionsTest < ActiveSupport::TestCase
|
||||
boards(:writebook).cards.create title: "Cleanup", description: "Did you finish up with the cleanup, #{attachment.to_html}?"
|
||||
end
|
||||
|
||||
card = Card.find(card.id)
|
||||
|
||||
assert_difference -> { Mention.count }, +1 do
|
||||
card.published!
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user