Skip to content

Commit

Permalink
refactor: improve conventions in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Wiebe committed Nov 13, 2019
1 parent 599488c commit e4e9ca8
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/procedures/__tests__/ModifyShareholderData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ const params = {
{
address: testAddress,
canSendAfter: new Date(2030, 1),
canReceiveAfter: new Date(0, 0),
kycExpiry: new Date(2035, 1),
canReceiveAfter: new Date(1981, 1),
kycExpiry: new Date(2035, 2),
canBuyFromSto: true,
isAccredited: true,
},
{
address: testAddress2,
canSendAfter: new Date(2030, 1),
canReceiveAfter: new Date(0, 0),
kycExpiry: new Date(2035, 1),
canReceiveAfter: new Date(1981, 1),
kycExpiry: new Date(2035, 2),
canBuyFromSto: true,
isAccredited: true,
},
Expand Down Expand Up @@ -155,10 +155,8 @@ describe('ModifyShareholderData', () => {

test('should return the newly created checkpoint', async () => {
const shareholderObject = {
shareholder: {
securityTokenId: () => params.symbol,
address: () => testAddress,
},
securityTokenId: () => params.symbol,
address: () => testAddress,
};
const fetchStub = shareholderFactoryMock.mock('fetch', Promise.resolve(shareholderObject));

Expand Down Expand Up @@ -251,10 +249,8 @@ describe('ModifyShareholderData', () => {

test('should return the newly created checkpoint without changing flags', async () => {
const shareholderObject = {
shareholder: {
securityTokenId: () => params.symbol,
address: () => testAddress,
},
securityTokenId: () => params.symbol,
address: () => testAddress,
};
const fetchStub = shareholderFactoryMock.mock('fetch', Promise.resolve(shareholderObject));

Expand Down

0 comments on commit e4e9ca8

Please sign in to comment.