@@ -20,13 +20,15 @@ describe('Parse LiveQuery', () => {
20
20
it ( 'can subscribe to query' , async ( done ) => {
21
21
const object = new TestObject ( ) ;
22
22
await object . save ( ) ;
23
+ const installationId = await Parse . CoreManager . getInstallationController ( ) . currentInstallationId ( ) ;
23
24
24
25
const query = new Parse . Query ( TestObject ) ;
25
26
query . equalTo ( 'objectId' , object . id ) ;
26
27
const subscription = await query . subscribe ( ) ;
27
28
28
- subscription . on ( 'update' , object => {
29
+ subscription . on ( 'update' , ( object , original , response ) => {
29
30
assert . equal ( object . get ( 'foo' ) , 'bar' ) ;
31
+ assert . equal ( response . installationId , installationId ) ;
30
32
done ( ) ;
31
33
} )
32
34
object . set ( { foo : 'bar' } ) ;
@@ -36,6 +38,7 @@ describe('Parse LiveQuery', () => {
36
38
it ( 'can subscribe to query with client' , async ( done ) => {
37
39
const object = new TestObject ( ) ;
38
40
await object . save ( ) ;
41
+ const installationId = await Parse . CoreManager . getInstallationController ( ) . currentInstallationId ( ) ;
39
42
40
43
const query = new Parse . Query ( TestObject ) ;
41
44
query . equalTo ( 'objectId' , object . id ) ;
@@ -45,8 +48,9 @@ describe('Parse LiveQuery', () => {
45
48
}
46
49
const subscription = client . subscribe ( query ) ;
47
50
48
- subscription . on ( 'update' , object => {
51
+ subscription . on ( 'update' , ( object , original , response ) => {
49
52
assert . equal ( object . get ( 'foo' ) , 'bar' ) ;
53
+ assert . equal ( response . installationId , installationId ) ;
50
54
done ( ) ;
51
55
} ) ;
52
56
await subscription . subscribePromise ;
0 commit comments