diff --git a/tests/10-issuer.js b/tests/10-issuer.js index 3c69ccf..af42002 100644 --- a/tests/10-issuer.js +++ b/tests/10-issuer.js @@ -74,13 +74,13 @@ describe('Issue Credential - Data Integrity', function() { const {result, error} = await issuer.post({json: body}); shouldThrowInvalidInput({result, error}); }); - it('credential "@context" items MUST be strings.', async function() { + it('credential "@context" items MUST be strings or objects.', async function() { this.test.cell = { columnId: name, rowId: this.test.title }; const body = createRequestBody({issuer}); - const invalidContextTypes = [{foo: true}, 4, false, null]; + const invalidContextTypes = [4, false, null, []]; for(const invalidContextType of invalidContextTypes) { body.credential['@context'] = invalidContextType; const {result, error} = await issuer.post({json: {...body}}); diff --git a/tests/11-issuer-jwt.js b/tests/11-issuer-jwt.js index c76bc15..95d650b 100644 --- a/tests/11-issuer-jwt.js +++ b/tests/11-issuer-jwt.js @@ -71,13 +71,13 @@ describe('Issue Credential - JWT', function() { const {result, error} = await issuer.post({json: body}); shouldThrowInvalidInput({result, error}); }); - it('credential "@context" items MUST be strings.', async function() { + it('credential "@context" items MUST be strings or objects.', async function() { this.test.cell = { columnId: name, rowId: this.test.title }; const body = createRequestBody({issuer}); - const invalidContextTypes = [{foo: true}, 4, false, null]; + const invalidContextTypes = [4, false, null, []]; for(const invalidContextType of invalidContextTypes) { body.credential['@context'] = invalidContextType; const {result, error} = await issuer.post({json: {...body}});