diff options
Diffstat (limited to 'actioncable/test/javascript')
-rw-r--r-- | actioncable/test/javascript/src/unit/action_cable_test.js | 5 |
1 files changed, 3 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 2181f955e3..c46f9878d2 100644 --- a/actioncable/test/javascript/src/unit/action_cable_test.js +++ b/actioncable/test/javascript/src/unit/action_cable_test.js @@ -42,14 +42,15 @@ 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 dynamicURL } + const consumer = ActionCable.createConsumer(generateURL) + assert.equal(consumer.url, testURL) dynamicURL = `${testURL}foo` - const consumer = ActionCable.createConsumer(generateURL) assert.equal(consumer.url, `${testURL}foo`) }) }) |