diff --git a/tests/__tests__/lookup-map.ava.js b/tests/__tests__/lookup-map.ava.js index 2cc8b471..1ff0eeee 100644 --- a/tests/__tests__/lookup-map.ava.js +++ b/tests/__tests__/lookup-map.ava.js @@ -113,4 +113,16 @@ test('LookupMap set get object', async t => { 'house house1 has 2 rooms. room room1 is 200sqft.' ) -}) \ No newline at end of file +}) + +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' + ); +}); \ No newline at end of file