From 155f75c524c6df59237317a38d56ebaee59ff1d1 Mon Sep 17 00:00:00 2001 From: Fahrrader Date: Tue, 20 Sep 2022 09:04:54 +0000 Subject: [PATCH] tests(app-promotion): fix a test to new expected behavior --- --- a/tests/src/app-promotion.test.ts +++ b/tests/src/app-promotion.test.ts @@ -555,9 +555,8 @@ const flipper = await helper.eth.deployFlipper(contractOwner); await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address]); - const stopSponsoringResult = await helper.executeExtrinsic(nonAdmin, 'api.tx.appPromotion.stopSponsoringContract', [flipper.options.address]); - expect(stopSponsoringResult.status).to.equal('Fail'); - expect(stopSponsoringResult.moduleError).to.equal('appPromotion.NoPermission'); + await expect(helper.executeExtrinsic(nonAdmin, 'api.tx.appPromotion.stopSponsoringContract', [flipper.options.address])) + .to.be.rejectedWith(/appPromotion\.NoPermission/); }); itEth('should not affect a contract which is not sponsored by pallete', async ({helper}) => { -- gitstuff