Skip to content

Commit

Permalink
Increment testing for @object data type
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelvenzi committed Sep 12, 2022
1 parent cd5d90d commit 885a6a2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/chaincode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ var testAssetList = []assets.AssetType{
DefaultValue: 0,
DataType: "number",
},
{
// Generic JSON object
Tag: "info",
Label: "Other Info",
DataType: "@object",
},
},
},
{
Expand Down
6 changes: 6 additions & 0 deletions test/tx_createAsset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ func TestCreateAsset(t *testing.T) {
"@assetType": "person",
"name": "Maria",
"id": "318.207.920-48",
"info": map[string]interface{}{
"passport": "1234",
},
}
req := map[string]interface{}{
"asset": []map[string]interface{}{person},
Expand All @@ -39,6 +42,9 @@ func TestCreateAsset(t *testing.T) {
"name": "Maria",
"id": "31820792048",
"height": 0.0,
"info": map[string]interface{}{
"passport": "1234",
},
}

if res.GetStatus() != 200 {
Expand Down

0 comments on commit 885a6a2

Please sign in to comment.