Created
May 7, 2018 01:14
-
-
Save johncrisostomo/1c96aef13927ecb51409eaa98f9bab7d 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 set SAVING_ERROR with the error message', () => { | |
const Meteor = {uuid: () => 'id', call: stub()}; | |
const LocalState = {set: spy()}; | |
const FlowRouter = {go: spy()}; | |
const err = {message: 'Oops'}; | |
Meteor.call.callsArgWith(4, err); | |
actions.create({Meteor, LocalState, FlowRouter}, 't', 'c'); | |
expect(LocalState.set.args[1]).to.deep.equal([ 'SAVING_ERROR', err.message ]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment