mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
[CST-6685] removed -a option
This commit is contained in:
@@ -150,11 +150,10 @@ describe('ExportBatchSelectorComponent', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should invoke the batch-export script with option --id uuid and -a option', () => {
|
||||
it('should invoke the batch-export script with option --id uuid option', () => {
|
||||
const parameterValues: ProcessParameter[] = [
|
||||
Object.assign(new ProcessParameter(), { name: '--id', value: mockCollection.uuid }),
|
||||
Object.assign(new ProcessParameter(), { name: '--type', value: 'COLLECTION' }),
|
||||
Object.assign(new ProcessParameter(), { name: '-a' }),
|
||||
];
|
||||
expect(scriptService.invoke).toHaveBeenCalledWith(BATCH_EXPORT_SCRIPT_NAME, parameterValues, []);
|
||||
});
|
||||
@@ -176,7 +175,7 @@ describe('ExportBatchSelectorComponent', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('should invoke the Batch-export script with option --id uuid without the -a option', () => {
|
||||
it('should invoke the Batch-export script with option --id uuid without option', () => {
|
||||
const parameterValues: ProcessParameter[] = [
|
||||
Object.assign(new ProcessParameter(), { name: '--id', value: mockCollection.uuid }),
|
||||
Object.assign(new ProcessParameter(), { name: '--type', value: 'COLLECTION' })
|
||||
|
@@ -86,10 +86,7 @@ export class ExportBatchSelectorComponent extends DSOSelectorModalWrapperCompone
|
||||
Object.assign(new ProcessParameter(), { name: '--type', value: 'COLLECTION' })
|
||||
];
|
||||
return this.authorizationDataService.isAuthorized(FeatureID.AdministratorOf).pipe(
|
||||
switchMap((isAdmin) => {
|
||||
if (isAdmin) {
|
||||
parameterValues.push(Object.assign(new ProcessParameter(), {name: '-a'}));
|
||||
}
|
||||
switchMap(() => {
|
||||
return this.scriptDataService.invoke(BATCH_EXPORT_SCRIPT_NAME, parameterValues, []);
|
||||
}),
|
||||
getFirstCompletedRemoteData(),
|
||||
|
Reference in New Issue
Block a user