mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Fix issue with comcol-data.service.spec.ts
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
|||||||
createSuccessfulRemoteDataObject$
|
createSuccessfulRemoteDataObject$
|
||||||
} from '../../shared/remote-data.utils';
|
} from '../../shared/remote-data.utils';
|
||||||
import { BitstreamDataService } from './bitstream-data.service';
|
import { BitstreamDataService } from './bitstream-data.service';
|
||||||
|
import { take } from 'rxjs/operators';
|
||||||
|
|
||||||
const LINK_NAME = 'test';
|
const LINK_NAME = 'test';
|
||||||
|
|
||||||
@@ -162,12 +163,11 @@ describe('ComColDataService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('if the scope Community can\'t be found', () => {
|
describe('if the scope Community can\'t be found', () => {
|
||||||
it('should throw an error', (done) => {
|
it('should throw an error', () => {
|
||||||
const result = service.getBrowseEndpoint(options);
|
const result = service.getBrowseEndpoint(options).pipe(take(1));
|
||||||
const expected = cold('--#-', undefined, new Error(`The Community with scope ${scopeID} couldn't be retrieved`));
|
const expected = cold('--#-', undefined, new Error(`The Community with scope ${scopeID} couldn't be retrieved`));
|
||||||
|
|
||||||
expect(result).toBeObservable(expected);
|
expect(result).toBeObservable(expected);
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user