Last active
June 18, 2019 06:53
-
-
Save lydemann/29774f0dbd40af01e06004fa40790c71 to your computer and use it in GitHub Desktop.
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