Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLefrere committed Sep 7, 2018
1 parent ab93d73 commit a1f1a02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('MultisigOperation', () => {

expect(assert).toHaveBeenCalledWith(
true,
expect.stringContaining('Missing signatures (from addresses'),
expect.stringContaining('Missing signatures (from address'),
);

expect(valid).toBe(true);
Expand All @@ -217,7 +217,7 @@ describe('MultisigOperation', () => {

expect(assert).toHaveBeenCalledWith(
false,
`Missing signatures (from addresses ${addressThree})`,
`Missing signatures (from address ${addressThree})`,
);
});

Expand Down Expand Up @@ -423,7 +423,10 @@ describe('MultisigOperation', () => {

op._addSignature(signature, address);

expect(op._signers).toEqual({ [address]: { ...signature, ...mode } });
expect(op._signers).toEqual({
// The address should have been converted to lowercase
[address.toLowerCase()]: { ...signature, ...mode },
});
expect(op._findSignatureMode).toHaveBeenCalled();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('Parameter types', () => {

// Validation
expect(validateValueType(date, 'date')).toBe(true);
expect(validateValueType(new Date('not a valid date'), 'date')).toBe(false);
expect(validateValueType(new Date(0), 'date')).toBe(true);
expect(validateValueType(0, 'date')).toBe(false);
expect(validateValueType(null, 'date')).toBe(false);

Expand Down

0 comments on commit a1f1a02

Please sign in to comment.