Created
June 20, 2016 15:47
-
-
Save persocon/8c30534694d7d7547f607d215c2c58c8 to your computer and use it in GitHub Desktop.
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
it('should fill in GET_OPTIONS when fetching all options is done', () => { | |
nock(apiUrl) | |
.get('/api/selectActivity/2/tkrp1986') | |
.reply(200, {options: [ | |
{ | |
value: "nightfall" | |
} | |
] | |
}); | |
const expectedAction = { | |
type: 'GET_OPTIONS', | |
options: [ | |
{ | |
value: "nightfall" | |
} | |
] | |
}; | |
const store = mockStore({ | |
user: userLoggedIn | |
}); | |
return store.dispatch(actions.getOptions(apiUrl)).should.eventually.equal(expectedAction); | |
// .then(() => { | |
// return expect(store.getActions()[0]).should.equal(expectedAction); | |
// }).should.notify(done); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment