FIX: Flaky test fix for Data Explorer Automated PM Feature (#235)

This commit is contained in:
David Battersby 2023-03-27 15:57:33 +08:00 committed by GitHub
parent 2c418e7484
commit f589864ce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ describe "RecurringDataExplorerResultPm" do
end
end
skip "ensures only allowed users in recipients field receive reports via pm" do
it "ensures only allowed users in recipients field receive reports via pm" do
expect do
automation.update(last_updated_by_id: admin.id)
automation.trigger!
@ -68,7 +68,7 @@ describe "RecurringDataExplorerResultPm" do
expect(created_topics.pluck(:archetype)).to eq(
[Archetype.private_message, Archetype.private_message, Archetype.private_message],
)
expect(created_topics.map { |t| t.allowed_users.pluck(:username) }).to match_array(
expect(created_topics.map { |t| t.allowed_users.pluck(:username).sort }).to match_array(
[
[user.username, Discourse.system_user.username],
[another_user.username, Discourse.system_user.username],