diff options
Diffstat (limited to 'actioncable/test/javascript/src')
-rw-r--r-- | actioncable/test/javascript/src/unit/action_cable_test.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actioncable/test/javascript/src/unit/action_cable_test.js b/actioncable/test/javascript/src/unit/action_cable_test.js index c9d34abc6d..c46f9878d2 100644 --- a/actioncable/test/javascript/src/unit/action_cable_test.js +++ b/actioncable/test/javascript/src/unit/action_cable_test.js @@ -42,12 +42,16 @@ module("ActionCable", () => { assert.equal(consumer.url, testURL) }) - test("uses function to generate URL", assert => { + test("dynamically computes URL from function", assert => { + let dynamicURL = testURL const generateURL = () => { - return testURL + return dynamicURL } const consumer = ActionCable.createConsumer(generateURL) assert.equal(consumer.url, testURL) + + dynamicURL = `${testURL}foo` + assert.equal(consumer.url, `${testURL}foo`) }) }) }) |