From e23643af47bf113dfc3079314e02631eaa62d1e3 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Mon, 9 Sep 2024 11:58:24 +0530 Subject: [PATCH] fix unit tests --- tests/unit/diddoc/common/did_doc_resolve_service_test.go | 1 + tests/unit/diddoc/request/diddoc_positive_cases_test.go | 2 +- tests/unit/diddoc/request/diddoc_transform_key_test.go | 2 +- .../unit/diddoc/request/request_service_resolve_did_doc_test.go | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/unit/diddoc/common/did_doc_resolve_service_test.go b/tests/unit/diddoc/common/did_doc_resolve_service_test.go index 60602b0e..1ca1d84f 100644 --- a/tests/unit/diddoc/common/did_doc_resolve_service_test.go +++ b/tests/unit/diddoc/common/did_doc_resolve_service_test.go @@ -28,6 +28,7 @@ var _ = DescribeTable("Test Resolve method", func(testCase resolveDidDocTestCase testCase.expectedDIDResolution.Did.Context = []string{ types.DIDSchemaJSONLD, types.JsonWebKey2020JSONLD, + types.DIFDIDConfigurationJSONLD } } else if testCase.expectedDIDResolution.Did != nil { testCase.expectedDIDResolution.Did.Context = nil diff --git a/tests/unit/diddoc/request/diddoc_positive_cases_test.go b/tests/unit/diddoc/request/diddoc_positive_cases_test.go index 3f996277..5c49ba9b 100644 --- a/tests/unit/diddoc/request/diddoc_positive_cases_test.go +++ b/tests/unit/diddoc/request/diddoc_positive_cases_test.go @@ -25,7 +25,7 @@ var _ = DescribeTable("Test Query handlers with versionId and versionTime params expectedDIDResolution := testCase.expectedResolution.(*types.DidResolution) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.JsonWebKey2020JSONLD} + expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } } else if expectedDIDResolution.Did != nil { expectedDIDResolution.Did.Context = nil } diff --git a/tests/unit/diddoc/request/diddoc_transform_key_test.go b/tests/unit/diddoc/request/diddoc_transform_key_test.go index eddbb84e..20e56793 100644 --- a/tests/unit/diddoc/request/diddoc_transform_key_test.go +++ b/tests/unit/diddoc/request/diddoc_transform_key_test.go @@ -23,7 +23,7 @@ var _ = DescribeTable("Test Query handler with transformKeys params", func(testC expectedDIDResolution := testCase.expectedResolution.(*types.DidResolution) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.JsonWebKey2020JSONLD} + expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } } else if expectedDIDResolution.Did != nil { expectedDIDResolution.Did.Context = nil } diff --git a/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go b/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go index 4013ae92..17c63682 100644 --- a/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go +++ b/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go @@ -31,7 +31,7 @@ var _ = DescribeTable("Test DIDDocEchoHandler function", func(testCase resolveDI context, rec := utils.SetupEmptyContext(request, testCase.resolutionType, utils.MockLedger) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - testCase.expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.JsonWebKey2020JSONLD} + testCase.expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } } else if testCase.expectedDIDResolution.Did != nil { testCase.expectedDIDResolution.Did.Context = nil }