From 4a289ad4c8e13b343fcb8fb18bfa4191732126d8 Mon Sep 17 00:00:00 2001 From: Aditya Dhir <31381639+adi44@users.noreply.github.com> Date: Mon, 23 Aug 2021 13:06:28 +0530 Subject: [PATCH] Added testcases for updateCollection (#356) --- test/AssetManager.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/AssetManager.js b/test/AssetManager.js index 059d108b..757a33f2 100644 --- a/test/AssetManager.js +++ b/test/AssetManager.js @@ -273,6 +273,16 @@ describe('AssetManager', function () { await assertRevert(tx, 'Job exists in this collection'); }); + it('updateCollection should only work for collections which exists', async function () { + const tx = assetManager.updateCollection(10, 2, 5); + assertRevert(tx, 'Collection ID not present'); + }); + + it('updateCollection should only work for collections which are currently active', async function () { + await assetManager.setAssetStatus(false, 3); + const tx = assetManager.updateCollection(3, 2, 5); + assertRevert(tx, 'Collection is inactive'); + }); // it('should be able to get result using proxy', async function () { // await delegator.upgradeDelegate(assetManager.address); // assert(await delegator.delegate() === assetManager.address);