mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
[CSTPER-222] handle metadata reading for communities and collections
Removed handle field and the setter from community and collection models.
This commit is contained in:
@@ -5,11 +5,9 @@ describe('Collection', () => {
|
||||
describe('Collection handle value', () => {
|
||||
|
||||
let metadataValue;
|
||||
let handleValue;
|
||||
|
||||
beforeEach(() => {
|
||||
metadataValue = {'dc.identifier.uri': [ { value: '123456789/1'}]};
|
||||
handleValue = '11111111111/1';
|
||||
})
|
||||
|
||||
it('should return the handle value from metadata', () => {
|
||||
@@ -17,13 +15,8 @@ describe('Collection', () => {
|
||||
expect(community.handle).toEqual('123456789/1');
|
||||
});
|
||||
|
||||
it('should return the handle value from metadata even when the handle field is provided', () => {
|
||||
const community = Object.assign(new Collection(), { handle: handleValue, 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(), { handle: handleValue });
|
||||
const community = Object.assign(new Collection(), { });
|
||||
expect(community.handle).toEqual(undefined);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user