Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-korotya committed Dec 23, 2024
1 parent f27ac93 commit fb7e86f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions merklize/merklize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit fb7e86f

Please sign in to comment.