Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gina Contrino committed Oct 11, 2017
1 parent 23e6a71 commit 3a2aaea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/actions/peers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('actions: peers', () => {
});

it('creates active peer config', () => {
getNetHash.returnsPromise().resolves({ nethash });
getNetHash.returnsPromise();
const data = {
passphrase,
network: {
Expand All @@ -50,6 +50,7 @@ describe('actions: peers', () => {
};

activePeerSet(data)(dispatch);
getNetHash.resolves({ nethash });

expect(dispatch).to.have.been.calledWith(match.hasNested('data.activePeer.options', data.network));
});
Expand All @@ -63,13 +64,14 @@ describe('actions: peers', () => {
});

it('dispatch activePeerSet with nethash from response when the network is a custom node', () => {
getNetHash.returnsPromise().resolves({ nethash: 'nethash from response' });
getNetHash.returnsPromise();
const network = {
address: 'http://localhost:4000',
custom: true,
};

activePeerSet({ passphrase, network })(dispatch);
getNetHash.resolves({ nethash: 'nethash from response' });

expect(dispatch).to.have.been.calledWith(match.hasNested('data.activePeer.nethash.nethash', 'nethash from response'));
});
Expand Down

0 comments on commit 3a2aaea

Please sign in to comment.