From cb8d430d71f1b71c3bf081094f481922b61a3f0b Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Tue, 12 Mar 2024 14:18:36 -0500 Subject: [PATCH] test sender and author of work evidence post --- ethereum/test/Work1.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ethereum/test/Work1.js b/ethereum/test/Work1.js index 0b9aedf..d21cb60 100644 --- a/ethereum/test/Work1.js +++ b/ethereum/test/Work1.js @@ -146,12 +146,14 @@ describe('Work1', () => { describe('Work evidence and approval/disapproval', () => { let dao; let work1; + let account1; let account2; beforeEach(async () => { const setup = await loadFixture(deploy); dao = setup.dao; work1 = setup.work1; + account1 = setup.account1; account2 = setup.account2; await dao.stakeAvailability(work1.target, 50, STAKE_DURATION); }); @@ -176,6 +178,9 @@ describe('Work1', () => { await work1.connect(account2).requestWork({ value: WORK1_PRICE }); await work1.submitWorkEvidence(0); await expect(work1.submitWorkApproval(0, true)).to.emit(dao, 'ValidationPoolInitiated').withArgs(1); + const post = await dao.posts(1); + expect(post.author).to.equal(account1); + expect(post.sender).to.equal(work1.target); }); it('should be able to submit work disapproval', async () => {