diff --git a/tests/10-vcdm2.js b/tests/10-vcdm2.js index db31f33..fc851c3 100644 --- a/tests/10-vcdm2.js +++ b/tests/10-vcdm2.js @@ -237,9 +237,12 @@ describe('Verifiable Credentials Data Model v2.0', function() { await assert.rejects( issue(require('./input/credential-type-unmapped-fail.json'))); }); - //FIXME how to test this? - it.skip('type property: "If more than one URL is provided, the URLs ' + + it('type property: "If more than one URL is provided, the URLs ' + 'MUST be interpreted as an unordered set."', async function() { + //issue VC with multiple urls in type property + await issue(require('./input/credential-type-urls-order-1-ok.json')); + //issue another VC with same urls in a different order + await issue(require('./input/credential-type-urls-order-2-ok.json')); }); // FIXME this needs to be expanded into at least 6 different tests // Verifiable Credential MUST have a type specified diff --git a/tests/input/credential-type-urls-order-1-ok.json b/tests/input/credential-type-urls-order-1-ok.json new file mode 100644 index 0000000..484f8a8 --- /dev/null +++ b/tests/input/credential-type-urls-order-1-ok.json @@ -0,0 +1,15 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential", + "https://example.org/#ExampleCredential1", + "https://example.org/#ExampleCredential2" + ], + "validFrom": "2023-02-23T21:41:38Z", + "issuer": "did:example:issuer", + "credentialSubject": { + "id": "did:example:subject" + } +} diff --git a/tests/input/credential-type-urls-order-2-ok.json b/tests/input/credential-type-urls-order-2-ok.json new file mode 100644 index 0000000..6bcb901 --- /dev/null +++ b/tests/input/credential-type-urls-order-2-ok.json @@ -0,0 +1,15 @@ +{ + "@context": [ + "https://www.w3.org/ns/credentials/v2" + ], + "type": [ + "VerifiableCredential", + "https://example.org/#ExampleCredential2", + "https://example.org/#ExampleCredential1" + ], + "validFrom": "2023-02-23T21:41:38Z", + "issuer": "did:example:issuer", + "credentialSubject": { + "id": "did:example:subject" + } +}