@@ -33,7 +33,7 @@ final class UnsignedLdpVPTokenBuilderTests: XCTestCase {
3333 XCTAssertEqual ( token. id, " ebc6f1c2 " )
3434 XCTAssertEqual ( token. holder, " did:example:wallet " )
3535 XCTAssertEqual ( token. verifiableCredential. count, 1 )
36- assertJsonString ( expected: " { \" holder \" : \" did:example:wallet \" , \" type \" :[ \" VerifiablePresentation \" ], \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" , \" https: \\ / \\ /w3id.org \\ /security \\ /suites \\ /ed25519-2020 \\ /v1 \" ], \" id \" : \" ebc6f1c2 \" , \" verifiableCredential \" :[{ \" type \" :[ \" VerifiableCredential \" ], \" issuanceDate \" : \" 2020-08-19T21:41:50Z \" , \" credentialSubject \" :{ \" id \" : \" did:example:subject \" }, \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" ], \" issuer \" : \" did:example:issuer \" }], \" proof \" :{ \" verificationMethod \" : \" did:example:wallet \" , \" challenge \" : \" test-challenge \" , \" domain \" : \" did:example:wallet \" , \" type \" : \" Ed25519Signature2020 \" }} " , actual: ( unsignedVPToken as! UnsignedLdpVPToken ) . dataToSign)
36+ assertJsonString ( expected: " { \" holder \" : \" did:example:wallet \" , \" type \" :[ \" VerifiablePresentation \" ], \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" , \" https: \\ / \\ /w3id.org \\ /security \\ /suites \\ /ed25519-2020 \\ /v1 \" ], \" id \" : \" ebc6f1c2 \" , \" verifiableCredential \" :[{ \" type \" :[ \" VerifiableCredential \" ], \" issuanceDate \" : \" 2020-08-19T21:41:50Z \" , \" credentialSubject \" :{ \" id \" : \" did:example:subject \" }, \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" ], \" issuer \" : \" did:example:issuer \" }], \" proof \" :{ \" verificationMethod \" : \" did:example:wallet \" , \" challenge \" : \" test-challenge \" , \" domain \" : \" test-domain \" , \" type \" : \" Ed25519Signature2020 \" }} " , actual: ( unsignedVPToken as! UnsignedLdpVPToken ) . dataToSign)
3737 }
3838
3939 func testCreationOfUnsignedLdpVPTokenWithDifferentSignatureSuite( ) async throws {
@@ -66,7 +66,7 @@ final class UnsignedLdpVPTokenBuilderTests: XCTestCase {
6666 XCTAssertEqual ( token. id, " ebc6f1c2 " )
6767 XCTAssertEqual ( token. holder, " did:example:wallet " )
6868 XCTAssertEqual ( token. verifiableCredential. count, 1 )
69- assertJsonString ( expected: " { \" holder \" : \" did:example:wallet \" , \" type \" :[ \" VerifiablePresentation \" ], \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" , \" https: \\ / \\ /w3id.org \\ /security \\ /suites \\ /jws-2020 \\ /v1 \" ], \" id \" : \" ebc6f1c2 \" , \" verifiableCredential \" :[{ \" type \" :[ \" VerifiableCredential \" ], \" issuanceDate \" : \" 2020-08-19T21:41:50Z \" , \" credentialSubject \" :{ \" id \" : \" did:example:subject \" }, \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" ], \" issuer \" : \" did:example:issuer \" }], \" proof \" :{ \" verificationMethod \" : \" did:example:wallet \" , \" challenge \" : \" test-challenge \" , \" domain \" : \" did:example:wallet \" , \" type \" : \" JsonWebSignature2020 \" }} " , actual: ( unsignedVPToken as! UnsignedLdpVPToken ) . dataToSign)
69+ assertJsonString ( expected: " { \" holder \" : \" did:example:wallet \" , \" type \" :[ \" VerifiablePresentation \" ], \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" , \" https: \\ / \\ /w3id.org \\ /security \\ /suites \\ /jws-2020 \\ /v1 \" ], \" id \" : \" ebc6f1c2 \" , \" verifiableCredential \" :[{ \" type \" :[ \" VerifiableCredential \" ], \" issuanceDate \" : \" 2020-08-19T21:41:50Z \" , \" credentialSubject \" :{ \" id \" : \" did:example:subject \" }, \" @context \" :[ \" https: \\ / \\ /www.w3.org \\ /2018 \\ /credentials \\ /v1 \" ], \" issuer \" : \" did:example:issuer \" }], \" proof \" :{ \" verificationMethod \" : \" did:example:wallet \" , \" challenge \" : \" test-challenge \" , \" domain \" : \" test-domain \" , \" type \" : \" JsonWebSignature2020 \" }} " , actual: ( unsignedVPToken as! UnsignedLdpVPToken ) . dataToSign)
7070 }
7171
7272
0 commit comments