DEV: Improve flaky time-sensitive specs (#9141)

This commit is contained in:
Jarek Radosz
2020-03-10 22:13:17 +01:00
committed by GitHub
parent f795c1b8e8
commit 29b35aa64c
49 changed files with 334 additions and 331 deletions

View File

@ -157,9 +157,11 @@ describe ComposerMessagesFinder do
SiteSetting.educate_until_posts = 10
user.stubs(:post_count).returns(11)
Fabricate(:post, topic: topic, user: user)
Fabricate(:post, topic: topic, user: user)
Fabricate(:post, topic: topic, user: user, post_type: Post.types[:small_action])
freeze_time(5.minutes.ago) do
Fabricate(:post, topic: topic, user: user)
Fabricate(:post, topic: topic, user: user)
Fabricate(:post, topic: topic, user: user, post_type: Post.types[:small_action])
end
SiteSetting.sequential_replies_threshold = 2
end