aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection/multiple_identifiers_test.rb
diff options
context:
space:
mode:
authorutilum <oz@utilum.com>2018-05-13 18:00:54 +0200
committerutilum <oz@utilum.com>2018-05-22 02:29:18 +0200
commit78288f75e127182751938353ef3005a29d9c3bc1 (patch)
tree7bbb3fb358348e2f2968ddfa59274568d06ef19b /actioncable/test/connection/multiple_identifiers_test.rb
parent6c574ac58993512f975ddaf1f679c5956cc576df (diff)
downloadrails-78288f75e127182751938353ef3005a29d9c3bc1.tar.gz
rails-78288f75e127182751938353ef3005a29d9c3bc1.tar.bz2
rails-78288f75e127182751938353ef3005a29d9c3bc1.zip
remove unnecessary mocking in ActionCable tests
Diffstat (limited to 'actioncable/test/connection/multiple_identifiers_test.rb')
-rw-r--r--actioncable/test/connection/multiple_identifiers_test.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/actioncable/test/connection/multiple_identifiers_test.rb b/actioncable/test/connection/multiple_identifiers_test.rb
index 7f90cb3876..51716410b2 100644
--- a/actioncable/test/connection/multiple_identifiers_test.rb
+++ b/actioncable/test/connection/multiple_identifiers_test.rb
@@ -16,20 +16,15 @@ class ActionCable::Connection::MultipleIdentifiersTest < ActionCable::TestCase
test "multiple connection identifiers" do
run_in_eventmachine do
- open_connection_with_stubbed_pubsub
+ open_connection
+
assert_equal "Room#my-room:User#lifo", @connection.connection_identifier
end
end
private
- def open_connection_with_stubbed_pubsub
+ def open_connection
server = TestServer.new
- server.stubs(:pubsub).returns(stub_everything("pubsub"))
-
- open_connection server: server
- end
-
- def open_connection(server:)
env = Rack::MockRequest.env_for "/test", "HTTP_HOST" => "localhost", "HTTP_CONNECTION" => "upgrade", "HTTP_UPGRADE" => "websocket"
@connection = Connection.new(server, env)