diff options
Diffstat (limited to 'actioncable/test/javascript/src/unit/consumer_test.coffee')
-rw-r--r-- | actioncable/test/javascript/src/unit/consumer_test.coffee | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actioncable/test/javascript/src/unit/consumer_test.coffee b/actioncable/test/javascript/src/unit/consumer_test.coffee new file mode 100644 index 0000000000..cf8a592255 --- /dev/null +++ b/actioncable/test/javascript/src/unit/consumer_test.coffee @@ -0,0 +1,11 @@ +{module, test} = QUnit +{consumerTest} = ActionCable.TestHelpers + +module "ActionCable.Consumer", -> + consumerTest "#connect", connect: false, ({consumer, server, done}) -> + server.on("connection", done) + consumer.connect() + + consumerTest "#disconnect", ({consumer, client, done}) -> + client.addEventListener("close", done) + consumer.disconnect() |