DEV: Fix a warning in a chat spec (#30904)

```
Checking for expected text of nil is confusing and/or pointless
since it will always match. Please specify a string or regexp instead.
plugins/chat/spec/system/chat_message_interaction_spec.rb:51
```
This commit is contained in:
Jarek Radosz 2025-01-21 23:44:28 +01:00 committed by GitHub
parent a3359ac7ad
commit 8e31991613
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,10 @@ RSpec.describe "Interacting with a message", type: :system do
DiscourseEvent.on(:chat_message_interaction, &blk)
find(".block__button").click
try_until_success { expect(chat_channel_page.messages).to have_text(action_id) }
try_until_success do
expect(action_id).to_not be_nil
expect(chat_channel_page.messages).to have_text(action_id)
end
ensure
DiscourseEvent.off(:chat_message_interaction, &blk)
end