aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-01-21 14:59:11 +1030
committerMatthew Draper <matthew@trebex.net>2016-01-24 22:52:40 +1030
commit322dca293b3716ccaa09e7e82046e539b0d2ffda (patch)
tree512383f2375ff948a085183c74c3da2848f58069 /actioncable/test/connection
parent68a9060d02b1eb35c12843c0f1653809b776b35b (diff)
downloadrails-322dca293b3716ccaa09e7e82046e539b0d2ffda.tar.gz
rails-322dca293b3716ccaa09e7e82046e539b0d2ffda.tar.bz2
rails-322dca293b3716ccaa09e7e82046e539b0d2ffda.zip
Import the relevant portions of faye-websocket
(as adapted to use concurrent-ruby / nio4r instead of eventmachine)
Diffstat (limited to 'actioncable/test/connection')
-rw-r--r--actioncable/test/connection/base_test.rb6
-rw-r--r--actioncable/test/connection/identifier_test.rb4
-rw-r--r--actioncable/test/connection/multiple_identifiers_test.rb4
3 files changed, 7 insertions, 7 deletions
diff --git a/actioncable/test/connection/base_test.rb b/actioncable/test/connection/base_test.rb
index 579578d0a7..e2b017a9a1 100644
--- a/actioncable/test/connection/base_test.rb
+++ b/actioncable/test/connection/base_test.rb
@@ -55,11 +55,11 @@ class ActionCable::Connection::BaseTest < ActionCable::TestCase
test "on connection open" do
run_in_eventmachine do
connection = open_connection
- connection.process
connection.websocket.expects(:transmit).with(regexp_matches(/\_ping/))
connection.message_buffer.expects(:process!)
+ connection.process
wait_for_async
assert_equal [ connection ], @server.connections
@@ -74,11 +74,11 @@ class ActionCable::Connection::BaseTest < ActionCable::TestCase
# Setup the connection
Concurrent::TimerTask.stubs(:new).returns(true)
- connection.send :on_open
+ connection.send :handle_open
assert connection.connected
connection.subscriptions.expects(:unsubscribe_from_all)
- connection.send :on_close
+ connection.send :handle_close
assert ! connection.connected
assert_equal [], @server.connections
diff --git a/actioncable/test/connection/identifier_test.rb b/actioncable/test/connection/identifier_test.rb
index a110dfdee0..1019ad541e 100644
--- a/actioncable/test/connection/identifier_test.rb
+++ b/actioncable/test/connection/identifier_test.rb
@@ -68,10 +68,10 @@ class ActionCable::Connection::IdentifierTest < ActionCable::TestCase
@connection = Connection.new(server, env)
@connection.process
- @connection.send :on_open
+ @connection.send :handle_open
end
def close_connection
- @connection.send :on_close
+ @connection.send :handle_close
end
end
diff --git a/actioncable/test/connection/multiple_identifiers_test.rb b/actioncable/test/connection/multiple_identifiers_test.rb
index 55a9f96cb3..e9bb4e6d7f 100644
--- a/actioncable/test/connection/multiple_identifiers_test.rb
+++ b/actioncable/test/connection/multiple_identifiers_test.rb
@@ -32,10 +32,10 @@ class ActionCable::Connection::MultipleIdentifiersTest < ActionCable::TestCase
@connection = Connection.new(server, env)
@connection.process
- @connection.send :on_open
+ @connection.send :handle_open
end
def close_connection
- @connection.send :on_close
+ @connection.send :handle_close
end
end