aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/test')
-rw-r--r--actioncable/test/javascript/src/unit/action_cable_test.js8
-rw-r--r--actioncable/test/subscription_adapter/postgresql_test.rb2
2 files changed, 10 insertions, 0 deletions
diff --git a/actioncable/test/javascript/src/unit/action_cable_test.js b/actioncable/test/javascript/src/unit/action_cable_test.js
index 83426fa32e..c9d34abc6d 100644
--- a/actioncable/test/javascript/src/unit/action_cable_test.js
+++ b/actioncable/test/javascript/src/unit/action_cable_test.js
@@ -41,5 +41,13 @@ module("ActionCable", () => {
assert.equal(consumer.url, testURL)
})
+
+ test("uses function to generate URL", assert => {
+ const generateURL = () => {
+ return testURL
+ }
+ const consumer = ActionCable.createConsumer(generateURL)
+ assert.equal(consumer.url, testURL)
+ })
})
})
diff --git a/actioncable/test/subscription_adapter/postgresql_test.rb b/actioncable/test/subscription_adapter/postgresql_test.rb
index 5fb26a8896..4348eb1b1e 100644
--- a/actioncable/test/subscription_adapter/postgresql_test.rb
+++ b/actioncable/test/subscription_adapter/postgresql_test.rb
@@ -2,11 +2,13 @@
require "test_helper"
require_relative "common"
+require_relative "channel_prefix"
require "active_record"
class PostgresqlAdapterTest < ActionCable::TestCase
include CommonSubscriptionAdapterTest
+ include ChannelPrefixTest
def setup
database_config = { "adapter" => "postgresql", "database" => "activerecord_unittest" }