File tree Expand file tree Collapse file tree
smartcontract/sdk/rs/src/commands/device Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,8 +156,10 @@ mod tests {
156156 )
157157 . returning ( |_, _| Ok ( Signature :: new_unique ( ) ) ) ;
158158
159+ // Use mixed-case input to verify SDK lowercases device codes,
160+ // preventing duplicates like "Test_Device" vs "test_device"
159161 let command = CreateDeviceCommand {
160- code : "test_device " . to_string ( ) ,
162+ code : "Test_Device " . to_string ( ) ,
161163 contributor_pk : contributor_pubkey,
162164 location_pk : location_pubkey,
163165 exchange_pk : exchange_pubkey,
Original file line number Diff line number Diff line change @@ -221,9 +221,11 @@ mod tests {
221221 )
222222 . returning ( |_, _| Ok ( Signature :: new_unique ( ) ) ) ;
223223
224+ // Use mixed-case input to verify SDK lowercases device codes,
225+ // preventing duplicates like "Test_Device" vs "test_device"
224226 let update_command = UpdateDeviceCommand {
225227 pubkey : device_pubkey,
226- code : Some ( "test_device " . to_string ( ) ) ,
228+ code : Some ( "Test_Device " . to_string ( ) ) ,
227229 contributor_pk : None ,
228230 device_type : Some ( DeviceType :: Hybrid ) ,
229231 public_ip : None ,
You can’t perform that action at this time.
0 commit comments