diff options
author | utilum <oz@utilum.com> | 2018-05-13 18:00:54 +0200 |
---|---|---|
committer | utilum <oz@utilum.com> | 2018-05-22 02:29:18 +0200 |
commit | 78288f75e127182751938353ef3005a29d9c3bc1 (patch) | |
tree | 7bbb3fb358348e2f2968ddfa59274568d06ef19b /actioncable/test/connection/multiple_identifiers_test.rb | |
parent | 6c574ac58993512f975ddaf1f679c5956cc576df (diff) | |
download | rails-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.rb | 11 |
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) |