@@ -33,7 +33,7 @@ local mock_device = test.mock_device.build_test_zigbee_device(
33
33
data = {
34
34
lockCodes = json .encode ({
35
35
[" 1" ] = " Zach" ,
36
- [" 2 " ] = " Steven"
36
+ [" 5 " ] = " Steven"
37
37
}),
38
38
}
39
39
}
@@ -54,17 +54,7 @@ test.register_coroutine_test(
54
54
test .socket .zigbee :__expect_send ({ mock_device .id , Alarm .attributes .AlarmCount :read (mock_device ) })
55
55
test .wait_for_events ()
56
56
-- Validate lockCodes field
57
- mock_datastore .__assert_device_store_contains (mock_device .id , " lockCodes" , { [" 1" ] = " Zach" , [" 2" ] = " Steven" })
58
- -- Validate state cache
59
- mock_datastore .__assert_device_store_contains (mock_device .id , " __state_cache" ,
60
- {
61
- main = {
62
- lockCodes = {
63
- lockCodes = {value = json .encode ({ [" 1" ] = " Zach" , [" 2" ] = " Steven" }) }
64
- }
65
- }
66
- }
67
- )
57
+ mock_datastore .__assert_device_store_contains (mock_device .id , " lockCodes" , { [" 1" ] = " Zach" , [" 5" ] = " Steven" })
68
58
-- Validate migration complete flag
69
59
mock_datastore .__assert_device_store_contains (mock_device .id , " migrationComplete" , true )
70
60
@@ -81,7 +71,7 @@ test.register_coroutine_test(
81
71
test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockCredentials .minPinCodeLen (5 , { visibility = { displayed = false } })))
82
72
test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockCredentials .maxPinCodeLen (10 , { visibility = { displayed = false } })))
83
73
test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockCredentials .pinUsersSupported (4 , { visibility = { displayed = false } })))
84
- test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockCredentials .credentials ({{credentialIndex = 1 , credentialType = " pin" , userIndex = 1 }, {credentialIndex = 2 , credentialType = " pin" , userIndex = 2 }}, { visibility = { displayed = false } })))
74
+ test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockCredentials .credentials ({{credentialIndex = 1 , credentialType = " pin" , userIndex = 1 }, {credentialIndex = 5 , credentialType = " pin" , userIndex = 2 }}, { visibility = { displayed = false } })))
85
75
test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockCredentials .supportedCredentials ({" pin" }, { visibility = { displayed = false } })))
86
76
test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockUsers .users ({{userIndex = 1 , userName = " Zach" , userType = " guest" }, {userIndex = 2 , userName = " Steven" , userType = " guest" }}, { visibility = { displayed = false } })))
87
77
test .socket .capability :__expect_send ( mock_device :generate_test_message (" main" , capabilities .lockCodes .migrated (true , { visibility = { displayed = false } })))
0 commit comments