Skip to content

Commit 989f113

Browse files
Revert "[DSC-2140] add tests"
This reverts commit 3c08054.
1 parent 058060e commit 989f113

2 files changed

Lines changed: 2 additions & 19 deletions

File tree

src/app/core/shared/metadata.utils.spec.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { isUndefined } from '../../shared/empty.util';
22
import { v4 as uuidv4 } from 'uuid';
33
import { MetadataMap, MetadataValue, MetadataValueFilter, MetadatumViewModel } from './metadata.models';
4-
import { Metadata, PLACEHOLDER_VALUE } from './metadata.utils';
4+
import { Metadata } from './metadata.utils';
55

66
const mdValue = (value: string, language?: string, authority?: string): MetadataValue => {
77
return Object.assign(new MetadataValue(), {
@@ -306,21 +306,4 @@ describe('Metadata', () => {
306306
testAllWithLimit(multiMap, 'dc.title', [dcTitle1], 1);
307307
});
308308
});
309-
310-
describe('Placeholder values', () => {
311-
it('should ignore placeholder values in get methods', () => {
312-
const placeholderMd = mdValue(PLACEHOLDER_VALUE);
313-
const key = 'dc.test.placeholder';
314-
const map = { 'dc.test.placeholder': [placeholderMd] };
315-
316-
expect(Metadata.all(map, key).length).toEqual(0);
317-
expect(Metadata.allValues(map, key).length).toEqual(0);
318-
expect(Metadata.has(map, key)).toBeFalsy();
319-
expect(Metadata.first(map, key)).toBeUndefined();
320-
expect(Metadata.firstValue(map, key)).toBeUndefined();
321-
expect(Metadata.hasValue(placeholderMd)).toBeFalsy();
322-
expect(Metadata.valueMatches(placeholderMd, null)).toBeFalsy();
323-
});
324-
});
325-
326309
});

src/app/core/shared/metadata.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export class Metadata {
156156
return false;
157157
}
158158
if (isObject(value) && value.hasOwnProperty('value')) {
159-
return isNotEmpty(value.value) && value.value !== PLACEHOLDER_VALUE;
159+
return isNotEmpty(value.value);
160160
}
161161
return true;
162162
}

0 commit comments

Comments
 (0)