1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actioncable/test/subscription_adapter/subscriber_map_test.rb
2017-07-23 23:30:29 +03:00

19 lines
530 B
Ruby

# frozen_string_literal: true
require "test_helper"
class SubscriberMapTest < ActionCable::TestCase
test "broadcast should not change subscribers" do
setup_subscription_map
origin = @subscription_map.instance_variable_get(:@subscribers).dup
@subscription_map.broadcast("not_exist_channel", "")
assert_equal origin, @subscription_map.instance_variable_get(:@subscribers)
end
private
def setup_subscription_map
@subscription_map = ActionCable::SubscriptionAdapter::SubscriberMap.new
end
end