From 357fb3c3d0440e00df450a89a5019b90aed2ab5d Mon Sep 17 00:00:00 2001 From: mineme0110 Date: Wed, 14 Aug 2024 14:14:21 +0100 Subject: [PATCH] fix test Signed-off-by: mineme0110 --- .../core/service/PresentationServiceSpec.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpec.scala b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpec.scala index ab48ee7a51..b135946e1d 100644 --- a/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpec.scala +++ b/pollux/core/src/test/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceSpec.scala @@ -60,7 +60,7 @@ object PresentationServiceSpec extends ZIOSpecDefault with PresentationServiceSp check( Gen.uuid.map(e => DidCommID(e.toString)), - Gen.option(Gen.string), + Gen.string, Gen.listOfBounded(1, 5)(proofTypeGen), Gen.option(optionsGen) ) { (thid, connectionId, proofTypes, options) => @@ -72,7 +72,7 @@ object PresentationServiceSpec extends ZIOSpecDefault with PresentationServiceSp pairwiseVerifierDid, Some(pairwiseProverDid), thid, - connectionId, + Some(connectionId), proofTypes, options, None, @@ -81,7 +81,7 @@ object PresentationServiceSpec extends ZIOSpecDefault with PresentationServiceSp } yield { assertTrue(record.thid == thid) && assertTrue(record.updatedAt.isEmpty) && - assertTrue(record.connectionId == connectionId) && + assertTrue(record.connectionId.contains(connectionId)) && assertTrue(record.role == PresentationRecord.Role.Verifier) && assertTrue(record.protocolState == PresentationRecord.ProtocolState.RequestPending) && assertTrue(record.requestPresentationData.isDefined) && @@ -118,7 +118,7 @@ object PresentationServiceSpec extends ZIOSpecDefault with PresentationServiceSp test("createPresentationRecord creates a valid Anoncred PresentationRecord") { check( Gen.uuid.map(e => DidCommID(e.toString)), - Gen.option(Gen.string), + Gen.string, Gen.string, Gen.string, Gen.string @@ -140,7 +140,7 @@ object PresentationServiceSpec extends ZIOSpecDefault with PresentationServiceSp pairwiseVerifierDid, Some(pairwiseProverDid), thid, - connectionId, + Some(connectionId), anoncredPresentationRequestV1, None, None @@ -148,7 +148,7 @@ object PresentationServiceSpec extends ZIOSpecDefault with PresentationServiceSp } yield { assertTrue(record.thid == thid) && assertTrue(record.updatedAt.isEmpty) && - assertTrue(record.connectionId == connectionId) && + assertTrue(record.connectionId.contains(connectionId)) && assertTrue(record.role == PresentationRecord.Role.Verifier) && assertTrue(record.protocolState == PresentationRecord.ProtocolState.RequestPending) && assertTrue(record.requestPresentationData.isDefined) &&