c3c8abfbd7
This PR is similar to https://github.com/rails/rails/pull/47025, it makes Action Cable's `assert_broadcasts` return the messages that were broadast. This way you can do more analysis on them: ```ruby messages = assert_broadcasts("test", 2) do ActionCable.server.broadcast "test", { message: "one" } ActionCable.server.broadcast "test", { message: "two" } end assert_equal 2, messages.length assert_equal({ "message" => "one" }, messages.first) assert_equal({ "message" => "two" }, messages.last) ``` This is helpful if you expect lots of messages to be broadcast or if you want to only match on some element of the data; `assert_broadcast_on` doesn't work well in either of those scenarios. |
||
---|---|---|
.. | ||
channel | ||
connection | ||
javascript/src | ||
server | ||
stubs | ||
subscription_adapter | ||
client_test.rb | ||
javascript_package_test.rb | ||
test_helper_test.rb | ||
test_helper.rb | ||
worker_test.rb |