mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fix: Editing a topic with an invalid title will still push it to the top (#4185)
* fix: Editing a topic with an invalid title will still push it to the top * add specs to check topic not bumped with invalid title
This commit is contained in:
committed by
Régis Hanol
parent
38d0697b2f
commit
d1f61015c0
@@ -488,6 +488,13 @@ describe Topic do
|
||||
@topic.reload
|
||||
}.not_to change(@topic, :bumped_at)
|
||||
end
|
||||
|
||||
it "doesn't bump the topic when a post have invalid topic title while edit" do
|
||||
expect {
|
||||
@last_post.revise(Fabricate(:moderator), { title: 'invalid title' })
|
||||
@topic.reload
|
||||
}.not_to change(@topic, :bumped_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user