From fb7e86f8b7dbc009a4ef94f6b7fc9dff063cf649 Mon Sep 17 00:00:00 2001 From: ilya-korotya Date: Mon, 23 Dec 2024 18:22:45 +0100 Subject: [PATCH] add unit test --- merklize/merklize_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/merklize/merklize_test.go b/merklize/merklize_test.go index 8477498..ff0133f 100644 --- a/merklize/merklize_test.go +++ b/merklize/merklize_test.go @@ -1418,6 +1418,20 @@ func TestHashValues_FromDocument(t *testing.T) { value: "1997-04-16", wantHash: "861148800000000000", }, + { + name: "xsd:dateTime YYYY-MM-DD go format (2006-01-02) < January 1st, 1970", + pathToField: "KYCEmployee.hireDate", + datatype: "http://www.w3.org/2001/XMLSchema#dateTime", + value: "1960-02-20", + wantHash: "21888242871839275222246405745257275088548364400416034343697892887375808495617", + }, + { + name: "xsd:dateTime < January 1st, 1970 RFC3339Nano should be similar to YYYY-MM-DD format", + pathToField: "KYCEmployee.hireDate", + datatype: "http://www.w3.org/2001/XMLSchema#dateTime", + value: "1960-02-20T00:00:00Z", + wantHash: "21888242871839275222246405745257275088548364400416034343697892887375808495617", + }, { name: "xsd:string", pathToField: "KYCEmployee.position",