Skip to content

A platform for community discussion. Free, open, simple.

DEV: fixes failing spec (#20191)

Joffrey JAFFEUX19ff8210bc62
diff --git a/plugins/chat/spec/requests/chat_controller_spec.rb b/plugins/chat/spec/requests/chat_controller_spec.rb
index e2332ec56ed..9f1729837d0 100644
--- a/plugins/chat/spec/requests/chat_controller_spec.rb
+++ b/plugins/chat/spec/requests/chat_controller_spec.rb
@@ -576,8 +576,7 @@ RSpec.describe Chat::ChatController do
end.to change { ChatMessage.count }.by(-1)
expect(response.status).to eq(200)
- expect(events.size).to eq(1)
- expect(events.first[:event_name]).to eq(:chat_message_trashed)
+ expect(events.map { |event| event[:event_name] }).to include(:chat_message_trashed)
end
it "does not allow message delete when chat channel is read_only" do