aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection/multiple_identifiers_test.rb
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2018-05-23 08:45:06 -0700
committerGitHub <noreply@github.com>2018-05-23 08:45:06 -0700
commit70bd858af0addd17ea7b7bec4facbad25d3e4c4e (patch)
tree5741ce92d6e6c92834158047d6bf4f31f90bbeaf /actioncable/test/connection/multiple_identifiers_test.rb
parent2f76256127d35cfbfaadf162e4d8be2d0af4e453 (diff)
parent78288f75e127182751938353ef3005a29d9c3bc1 (diff)
downloadrails-70bd858af0addd17ea7b7bec4facbad25d3e4c4e.tar.gz
rails-70bd858af0addd17ea7b7bec4facbad25d3e4c4e.tar.bz2
rails-70bd858af0addd17ea7b7bec4facbad25d3e4c4e.zip
Merge pull request #32882 from utilum/unnecessary_mocking
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)