mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Add additional test for no server error
This commit is contained in:
parent
b90c676bc9
commit
68fc93ecbc
@ -77,4 +77,16 @@ describe('AlfrescoSearchService', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should notify a general error if the API does not return a specific error', (done) => {
|
||||
spyOn(fakeApi.core.searchApi, 'liveSearchNodes').and.returnValue(Promise.reject(null));
|
||||
service.getLiveSearchResults('').subscribe(
|
||||
() => {},
|
||||
(res: any) => {
|
||||
expect(res).toBeDefined();
|
||||
expect(res).toEqual('Server error');
|
||||
done();
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user