Last active
December 17, 2015 01:35
-
-
Save kloy/3d0dafe1f6974f88c909 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
'should change isLoading when matters fetched'.test(() => { | |
mockStore.dispatch(actions.fetchMatters({ | |
route: 'matters', | |
initial: true, | |
})); | |
mockPromises.tick(); | |
expect(mockStore.getState().mattersView).toEqual({ | |
...mattersViewFixture, | |
fetchStates: 'LOADING', | |
}); | |
expect(requests.length).toBe(1); | |
const request = requests[0]; | |
request.respond(200, null, JSON.stringify(fixture.list)); | |
mockPromises.tick(); | |
expect(request.url).toBe('/matters'); | |
expect(request.method).toBe('GET'); | |
expect(mockStore.getState().mattersView).toEqual(mattersViewFixture); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment