From e066b1abba13b72a9d76b008d9a451a292b6c500 Mon Sep 17 00:00:00 2001 From: Angelo Laub Date: Thu, 24 Nov 2022 09:06:52 +0100 Subject: [PATCH] fix stakevote tests --- contracts/stakevote/stakevote.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contracts/stakevote/stakevote.test.ts b/contracts/stakevote/stakevote.test.ts index 3da489dd..5393c51d 100644 --- a/contracts/stakevote/stakevote.test.ts +++ b/contracts/stakevote/stakevote.test.ts @@ -106,8 +106,13 @@ describe('Stakevote', () => { }); }); it('before voting, total_weight_of_votes should be zero', async () => { - const x = await get_from_dacglobals(dacId, 'total_weight_of_votes'); - chai.expect(x).to.equal(0); + let dacState = await shared.daccustodian_contract.dacglobalsTable({ + scope: dacId, + }); + const res = dacState.rows[0].data.find( + (x) => x.key === 'total_weight_of_votes' + ); + chai.expect(res).to.be.undefined; }); it('should create weights table entries', async () => { const expected_weight = await get_expected_vote_weight(