Last active
June 18, 2019 06:53
todo-list-sandbox.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('saveTodoItem', () => { | |
it('should create todo', () => { | |
const todoItem = new TODOItem('', ''); | |
todoListResourcesServiceStub.addTodo.and.returnValue(of(todoItem)); | |
service | |
.saveTodoItem(todoItem) | |
.pipe(first()) | |
.subscribe(() => {}); | |
expect(store.dispatch).toHaveBeenCalledWith(new SaveTodoItemStartedAction()); | |
expect(store.dispatch).toHaveBeenCalledWith(new AddTodoItemSuccessAction(todoItem)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment