We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61d7b79 commit d573fb1Copy full SHA for d573fb1
actioncable/lib/action_cable/channel/test_case.rb
@@ -62,6 +62,25 @@ def initialize(identifiers = {})
62
def transmit(cable_message)
63
transmissions << cable_message.with_indifferent_access
64
end
65
+
66
+ def connection_identifier
67
+ unless defined? @connection_identifier
68
+ @connection_identifier = connection_gid identifiers.filter_map { |id| instance_variable_get("@#{id}") }
69
+ end
70
71
+ @connection_identifier
72
73
74
+ private
75
+ def connection_gid(ids)
76
+ ids.map do |o|
77
+ if o.respond_to? :to_gid_param
78
+ o.to_gid_param
79
+ else
80
+ o.to_s
81
82
+ end.sort.join(":")
83
84
85
86
# Superclass for Action Cable channel functional tests.
0 commit comments