mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
25 lines
692 B
TypeScript
25 lines
692 B
TypeScript
import {Collection} from './collection.model';
|
|
|
|
describe('Collection', () => {
|
|
|
|
describe('Collection handle value', () => {
|
|
|
|
let metadataValue;
|
|
|
|
beforeEach(() => {
|
|
metadataValue = {'dc.identifier.uri': [ { value: '123456789/1'}]};
|
|
})
|
|
|
|
it('should return the handle value from metadata', () => {
|
|
const community = Object.assign(new Collection(), { metadata: metadataValue });
|
|
expect(community.handle).toEqual('123456789/1');
|
|
});
|
|
|
|
it('should return undefined if the handle value from metadata is not present', () => {
|
|
const community = Object.assign(new Collection(), { });
|
|
expect(community.handle).toEqual(undefined);
|
|
});
|
|
});
|
|
|
|
});
|