mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
3ecab07800
Similar to the channel streaming side, these values must be strings for ActionCable to behave as expected. The conversion will allow users to send string-convertible values and get the expected behavior.
15 lines
404 B
Ruby
15 lines
404 B
Ruby
require "test_helper"
|
|
|
|
class BroadcastingTest < ActiveSupport::TestCase
|
|
class TestServer
|
|
include ActionCable::Server::Broadcasting
|
|
end
|
|
|
|
test "fetching a broadcaster converts the broadcasting queue to a string" do
|
|
broadcasting = :test_queue
|
|
server = TestServer.new
|
|
broadcaster = server.broadcaster_for(broadcasting)
|
|
|
|
assert_equal "test_queue", broadcaster.broadcasting
|
|
end
|
|
end
|