blob: acc618bf0ce7e0c5fd6e836dca98325e124f8a75 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import consumerTest from "../test_helpers/consumer_test_helper"
const {module} = QUnit
module("ActionCable.Consumer", () => {
consumerTest("#connect", {connect: false}, ({consumer, server, assert, done}) => {
server.on("connection", () => {
assert.equal(consumer.connect(), false)
done()
})
consumer.connect()
})
consumerTest("#disconnect", ({consumer, client, done}) => {
client.addEventListener("close", done)
consumer.disconnect()
})
})
|