From 0719fed8ab213e3a73c0aea284827c8f0904b621 Mon Sep 17 00:00:00 2001 From: Serhii Volovyk Date: Fri, 16 Sep 2022 05:12:17 +0300 Subject: [PATCH] set twise test added (#209) --- tests/__tests__/lookup-map.ava.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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