Skip to content

Commit 38c77a1

Browse files
committed
Added packet type (cmd) for existing replace test for store.
Removed duplicated test.
1 parent bb3de0d commit 38c77a1

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

test/abstract_store.js

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ module.exports = function abstractStoreTest (build) {
7171

7272
it('should replace a packet when doing put with the same messageId', function (done) {
7373
var packet1 = {
74+
cmd: 'publish', // added
7475
topic: 'hello',
7576
payload: 'world',
7677
qos: 2,
7778
messageId: 42
7879
}
7980
var packet2 = {
81+
cmd: 'pubrel', // added
8082
qos: 2,
8183
messageId: 42
8284
}
@@ -130,30 +132,4 @@ module.exports = function abstractStoreTest (build) {
130132
})
131133
})
132134
})
133-
134-
it('should replace a packet when doing put with the same messageId', function (done) {
135-
var packet1 = {
136-
cmd: 'publish', // added
137-
topic: 'hello',
138-
payload: 'world',
139-
qos: 2,
140-
messageId: 42
141-
}
142-
var packet2 = {
143-
cmd: 'pubrel', // added
144-
qos: 2,
145-
messageId: 42
146-
}
147-
148-
store.put(packet1, function () {
149-
store.put(packet2, function () {
150-
store
151-
.createStream()
152-
.on('data', function (data) {
153-
data.should.eql(packet2)
154-
done()
155-
})
156-
})
157-
})
158-
})
159135
}

0 commit comments

Comments
 (0)