Skip to content

Commit

Permalink
Merge pull request #52 from identity-com/feature/CIV-2038_removing_en…
Browse files Browse the repository at this point in the history
…um_from_doc_types

Feature/civ 2038 removing enum from doc types
  • Loading branch information
dmelosantos authored Mar 8, 2021
2 parents e728e53 + ec807dc commit b471e1d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 3 additions & 3 deletions __test__/UserCollectableAttributes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ describe('UCA Constructions tests', () => {
expect(createUCA).toThrow();
});

test('Should throw error when constructing UCA with a value not in the enum definition', () => {
test('Should not throw an error when constructing UCA with any document type', () => {
const identifier = 'cvc:Document:type';
const value = 'invalid-document-type';
const value = 'any-document-type';
function createUCA() {
return new UCA(identifier, value);
}
expect(createUCA).toThrowError();
expect(createUCA).not.toThrowError();
});

test('Should construct UCA when value is in the enum definition', () => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@identity.com/uca",
"version": "1.0.26",
"version": "1.0.27",
"description": "Provides functionality around User Collectable Attributes (UCA)",
"main": "src/index.js",
"module": "dist/es/index.js",
Expand Down
10 changes: 0 additions & 10 deletions src/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,16 +712,6 @@ const definitions = [
identifier: 'cvc:Type:documentType',
version: '1',
type: 'String',
enum: {
UK_BIOMETRIC_RESIDENCE_PERMIT: 'uk_biometric_residence_permit',
BIOMETRIC_RESIDENCE_PERMIT: 'biometric_residence_permit',
DRIVING_LICENSE: 'driving_license',
NATIONAL_IDENTITY_CARD: 'national_identity_card',
PASSPORT: 'passport',
TAX_ID: 'tax_id',
UNKNOWN: 'unknown',
VOTER_ID: 'voter_id',
},
},
{
identifier: 'cvc:Document:type',
Expand Down

0 comments on commit b471e1d

Please sign in to comment.