NetanelBasal
4/22/2017 - 7:56 PM

et7.ts

it('should return a GET_POSTS_FAIL action with the error, on fail', () => {

  const expectedResult = getPostsFail('error');

  postsService.get.and.returnValue(Observable.throw('error'));
  
  runner.queue(getPosts());
  
  postsEffects.get$.subscribe(result => {
    expect(result).toEqual(expectedResult);
  });
  
});