Fixes after merge with master

This commit is contained in:
Giuseppe Digilio
2019-02-19 17:46:34 +01:00
parent 880d9ed069
commit f6fe2c3c3e
34 changed files with 164 additions and 238 deletions

View File

@@ -1,20 +1,17 @@
import { TestBed } from '@angular/core/testing';
import { Observable, of as observableOf } from 'rxjs';
import { provideMockActions } from '@ngrx/effects/testing';
import { cold, hot } from 'jasmine-marbles';
import { ServerSyncBufferEffects } from './server-sync-buffer.effects';
import { GLOBAL_CONFIG } from '../../../config';
import {
CommitSSBAction,
EmptySSBAction,
ServerSyncBufferActionTypes
} from './server-sync-buffer.actions';
import { CommitSSBAction, EmptySSBAction, ServerSyncBufferActionTypes } from './server-sync-buffer.actions';
import { RestRequestMethod } from '../data/rest-request-method';
import { Store } from '@ngrx/store';
import { Store, StoreModule } from '@ngrx/store';
import { RequestService } from '../data/request.service';
import { ObjectCacheService } from './object-cache.service';
import { MockStore } from '../../shared/testing/mock-store';
import { ObjectCacheState } from './object-cache.reducer';
import * as operators from 'rxjs/operators';
import { spyOnOperator } from '../../shared/testing/utils';
import { DSpaceObject } from '../shared/dspace-object.model';
@@ -38,8 +35,10 @@ describe('ServerSyncBufferEffects', () => {
let store;
beforeEach(() => {
store = new MockStore<ObjectCacheState>({});
TestBed.configureTestingModule({
imports: [
StoreModule.forRoot({}),
],
providers: [
ServerSyncBufferEffects,
provideMockActions(() => actions),
@@ -54,11 +53,12 @@ describe('ServerSyncBufferEffects', () => {
}
}
},
{ provide: Store, useValue: store }
{ provide: Store, useClass: MockStore }
// other providers
],
});
store = TestBed.get(Store);
ssbEffects = TestBed.get(ServerSyncBufferEffects);
});