aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/javascript/src/unit/consumer_test.coffee
blob: cf8a59225570af1ddbb4bde96fa75245c9dd0981 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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()