diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2016-03-02 16:11:28 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2016-03-02 16:11:28 +0100 |
commit | 696488194ebc26b4ecf05f57876940711eae650d (patch) | |
tree | 6363c74dac57bd35542e1630904d1dc230e204fa /actioncable/test | |
parent | fc1b32f8d1d26e41fa79d7a38c852acae24c77a0 (diff) | |
parent | 45635098ac827ee5b243ac01b6267843cd89200a (diff) | |
download | rails-696488194ebc26b4ecf05f57876940711eae650d.tar.gz rails-696488194ebc26b4ecf05f57876940711eae650d.tar.bz2 rails-696488194ebc26b4ecf05f57876940711eae650d.zip |
Merge pull request #23649 from maclover7/fix-22675
Accept channel identifiers with no backslashes/escaping
Diffstat (limited to 'actioncable/test')
-rw-r--r-- | actioncable/test/connection/subscriptions_test.rb | 4 | ||||
-rw-r--r-- | actioncable/test/test_helper.rb | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/actioncable/test/connection/subscriptions_test.rb b/actioncable/test/connection/subscriptions_test.rb index 62e41484fe..68a79c6e4c 100644 --- a/actioncable/test/connection/subscriptions_test.rb +++ b/actioncable/test/connection/subscriptions_test.rb @@ -82,13 +82,13 @@ class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase end end - test "unsubscrib from all" do + test "unsubscribe from all" do run_in_eventmachine do setup_connection channel1 = subscribe_to_chat_channel - channel2_id = ActiveSupport::JSON.encode(id: 2, channel: 'ActionCable::Connection::SubscriptionsTest::ChatChannel') + channel2_id = ActiveSupport::JSON.encode({ id: 2, channel: 'ActionCable::Connection::SubscriptionsTest::ChatChannel' }) channel2 = subscribe_to_chat_channel(channel2_id) channel1.expects(:unsubscribe_from_channel) diff --git a/actioncable/test/test_helper.rb b/actioncable/test/test_helper.rb index 8b157c9b46..797e7786d1 100644 --- a/actioncable/test/test_helper.rb +++ b/actioncable/test/test_helper.rb @@ -6,6 +6,7 @@ require 'puma' require 'mocha/setup' require 'rack/mock' +require 'active_support/core_ext/hash/indifferent_access' # Require all the stubs and models Dir[File.dirname(__FILE__) + '/stubs/*.rb'].each {|file| require file } |