We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello there!
It seems that there is a mistake in testing publishers part of readme.
Using .to broadcast with just the event name works perfectly, but declaring any arguments results in missing event_uid error.
.to broadcast
Example:
it 'emits vessels__comment_created' do user = create :user vessel = create :vessel expect { VesselComment.create!(user: user, vessel: vessel, message: 'New comment') }.to broadcast(:vessels__comment_created, comment_id: fetch_next_id_for(VesselComment)) end
error:
expected publisher to broadcast vessels__comment_created event with args: [{:comment_id=>14}] (actual events broadcast: vessels__comment_created({:comment_id=>14, :event_uid=>"7ad49ddea66b5805-ORIGIN-39c2bf7c9bcfc428"})) Diff: @@ -1 +1 @@ -[[{:comment_id=>14}]] +[[{:comment_id=>14, :event_uid=>"7ad49ddea66b5805-ORIGIN-39c2bf7c9bcfc428"}]]
It's worth noting that adding event_uid: anything to the broadcast's matcher parameters fixes the issue.
event_uid: anything
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello there!
It seems that there is a mistake in testing publishers part of readme.
Using
.to broadcast
with just the event name works perfectly, but declaring any arguments results in missing event_uid error.Example:
error:
It's worth noting that adding
event_uid: anything
to the broadcast's matcher parameters fixes the issue.The text was updated successfully, but these errors were encountered: