Skip to content

Commit

Permalink
set twise test added (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
volovyks authored Sep 16, 2022
1 parent c77f842 commit 0719fed
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/__tests__/lookup-map.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,16 @@ test('LookupMap set get object', async t => {
'house house1 has 2 rooms. room room1 is 200sqft.'
)

})
})

test('LookupMap allows you to use the same key for the second time', async t => {
const { ali, lookupMapContract } = t.context.accounts;

await ali.call(lookupMapContract, 'set', { key: 'hello', value: 'world' });
await ali.call(lookupMapContract, 'set', { key: 'hello', value: 'world' });

t.is(
await lookupMapContract.view('get', { key: 'hello' }),
'world'
);
});

0 comments on commit 0719fed

Please sign in to comment.