mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
[CST-4505] Fixed canChangeDiscoverable managment and unit testing
This commit is contained in:
@@ -37,8 +37,51 @@ const configRes = Object.assign(new SubmissionFormsModel(), {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const configResNotChangeDiscoverable = Object.assign(new SubmissionFormsModel(), {
|
||||
'id': 'AccessConditionDefaultConfiguration',
|
||||
'canChangeDiscoverable': false,
|
||||
'accessConditionOptions': [
|
||||
{
|
||||
'name': 'openaccess',
|
||||
'hasStartDate': false,
|
||||
'hasEndDate': false
|
||||
},
|
||||
{
|
||||
'name': 'lease',
|
||||
'hasStartDate': false,
|
||||
'hasEndDate': true,
|
||||
'maxEndDate': '2022-06-20T12:17:44.420+00:00'
|
||||
},
|
||||
{
|
||||
'name': 'embargo',
|
||||
'hasStartDate': true,
|
||||
'hasEndDate': false,
|
||||
'maxStartDate': '2024-12-20T12:17:44.420+00:00'
|
||||
},
|
||||
{
|
||||
'name': 'administrator',
|
||||
'hasStartDate': false,
|
||||
'hasEndDate': false
|
||||
}
|
||||
],
|
||||
'type': 'submissionaccessoption',
|
||||
'_links': {
|
||||
'self': {
|
||||
'href': 'http://localhost:8080/server/api/config/submissionaccessoptions/AccessConditionDefaultConfiguration'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export function getSubmissionAccessesConfigService(): SubmissionFormsConfigService {
|
||||
return jasmine.createSpyObj('SubmissionAccessesConfigService', {
|
||||
findByHref: createSuccessfulRemoteDataObject$(configRes),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function getSubmissionAccessesConfigNotChangeDiscoverableService(): SubmissionFormsConfigService {
|
||||
return jasmine.createSpyObj('SubmissionAccessesConfigService', {
|
||||
findByHref: createSuccessfulRemoteDataObject$(configResNotChangeDiscoverable),
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user