@@ -27,18 +27,16 @@ describe('generic can', function()
2727
2828 it (' shoud execute read command when setup' , function ()
2929 local messages = {
30- { msg_id = 0x123 },
31- { msg_id = 0x789 },
30+ { msg_id = 123 },
31+ { msg_id = 789 },
3232 }
3333 local timeout = math.random (5000 )
3434
3535 local peer_stub = prepare_peer_stub ()
3636 local s = spy .on (peer_stub , ' execute_command' )
3737 assert .is_nil (can :setup (' ' , { test_cmd = messages }, timeout ))
3838 assert .spy (s ).was_called (1 )
39- assert
40- .spy (s )
41- .was_called_with (peer_stub , ' read' , match .same ({ msg_ids = { 0x123 , 0x789 } }), { timeout = timeout })
39+ assert .spy (s ).was_called_with (peer_stub , ' read' , { msg_ids = ' 123,789' }, { timeout = timeout })
4240 end )
4341
4442 it (' should store cursor' , function ()
@@ -51,9 +49,7 @@ describe('generic can', function()
5149 local _ , err = can :get (' test_cur' )
5250 assert .is_nil (err )
5351 assert .spy (s ).was_called (1 )
54- assert
55- .spy (s )
56- .was_called_with (peer_stub , ' read' , match .same ({ msg_ids = {} }), { timeout = 1000 })
52+ assert .spy (s ).was_called_with (peer_stub , ' read' , { msg_ids = ' ' }, { timeout = 1000 })
5753
5854 peer_stub = prepare_peer_stub ()
5955 local s2 = spy .on (peer_stub , ' execute_command' )
@@ -62,7 +58,7 @@ describe('generic can', function()
6258 assert .spy (s2 ).was_called (1 )
6359 assert
6460 .spy (s2 )
65- .was_called_with (peer_stub , ' read' , match . same ( { cursor = cursor , msg_ids = {} }) , { timeout = 1000 })
61+ .was_called_with (peer_stub , ' read' , { cursor = cursor , msg_ids = ' ' } , { timeout = 1000 })
6662 end )
6763
6864 it (' should not get for unknow subscription' , function ()
0 commit comments