diff options
author | Matthew Draper <matthew@trebex.net> | 2016-07-04 08:39:02 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-04 08:39:02 +0930 |
commit | 550303c05c48f17b699a13258608e04bf63cf0e8 (patch) | |
tree | 4cfc38fbba5f441b13b777f47dcf9f89af54ae3a /actioncable/test | |
parent | ee50de03908f24c377d4842f759182fe9241c6fa (diff) | |
parent | 711d232f9344173d6a3f63d5239fe9a41f10e9bc (diff) | |
download | rails-550303c05c48f17b699a13258608e04bf63cf0e8.tar.gz rails-550303c05c48f17b699a13258608e04bf63cf0e8.tar.bz2 rails-550303c05c48f17b699a13258608e04bf63cf0e8.zip |
Merge pull request #25030 from mmmpa/pull_request
ActionCable, sometimes add_channel is not called.
Diffstat (limited to 'actioncable/test')
-rw-r--r-- | actioncable/test/subscription_adapter/subscriber_map_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/actioncable/test/subscription_adapter/subscriber_map_test.rb b/actioncable/test/subscription_adapter/subscriber_map_test.rb new file mode 100644 index 0000000000..5965ac2b90 --- /dev/null +++ b/actioncable/test/subscription_adapter/subscriber_map_test.rb @@ -0,0 +1,17 @@ +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 |