mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
93219: Add (more) reusable functions to test DataService composition
Data services that implement *Data interfaces should include the appropriate test functions in their specs. These go over all methods in the interface & check that they're "wired up" correctly. See e.g. the change in ExternalSourceDataService for an issue that is easy to miss but was highlighted by these new tests
This commit is contained in:
@@ -4,6 +4,7 @@ import { createPaginatedList } from '../../shared/testing/utils.test';
|
||||
import { ExternalSourceEntry } from '../shared/external-source-entry.model';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { GetRequest } from './request.models';
|
||||
import { testSearchDataImplementation } from './base/search-data.spec';
|
||||
|
||||
describe('ExternalSourceService', () => {
|
||||
let service: ExternalSourceDataService;
|
||||
@@ -57,6 +58,11 @@ describe('ExternalSourceService', () => {
|
||||
init();
|
||||
});
|
||||
|
||||
describe('composition', () => {
|
||||
const initService = () => new ExternalSourceDataService(null, null, null, null);
|
||||
testSearchDataImplementation(initService);
|
||||
});
|
||||
|
||||
describe('getExternalSourceEntries', () => {
|
||||
let result;
|
||||
|
||||
|
Reference in New Issue
Block a user