2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-04 17:32:34 +08:00

FIX: When testing multiple flagged words, ensure test matches expected word order. (#31758)

This fixes a flaky test, where the generated flagged words would sometimes not be in alphabetical order.
This commit is contained in:
Gary Pendergast 2025-03-12 09:45:44 +11:00 committed by GitHub
parent b4f9626984
commit b461c5f7a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,7 +267,7 @@ RSpec.describe WatchedWord do
ReviewableScore.where(
reviewable: reviewable,
reason: "watched_word",
context: "#{flag_word.word},#{another_flag_word.word}",
context: [flag_word.word, another_flag_word.word].sort.join(","),
),
).to be_present
end