From 76169cda400d34cb3b44415630cfa7bfd1bd5939 Mon Sep 17 00:00:00 2001 From: dwardu Date: Tue, 11 Sep 2018 17:32:05 +0200 Subject: [PATCH] Fixed a broken payment test (+ another small fix) (#1318) * Fixed a broken payment test * In PR template, npm run lint:fix, not lint:all:fix * In SplitPayment test, replaced an await-in-loop with Promise.all (cherry picked from commit b79196f911d013e1d3930e395cc5646917992cc3) --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- test/payment/SplitPayment.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c32ba08f2..72b331668 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,4 +14,4 @@ Fixes # - [ ] 📘 I've reviewed the [OpenZeppelin Contributor Guidelines](../blob/master/CONTRIBUTING.md) - [ ] ✅ I've added tests where applicable to test my new functionality. - [ ] 📖 I've made sure that my contracts are well-documented. -- [ ] 🎨 I've run the JS/Solidity linters and fixed any issues (`npm run lint:all:fix`). +- [ ] 🎨 I've run the JS/Solidity linters and fixed any issues (`npm run lint:fix`). diff --git a/test/payment/SplitPayment.test.js b/test/payment/SplitPayment.test.js index 788296016..05cc0b701 100644 --- a/test/payment/SplitPayment.test.js +++ b/test/payment/SplitPayment.test.js @@ -51,10 +51,10 @@ contract('SplitPayment', function ([_, owner, payee1, payee2, payee3, nonpayee1, }); it('should have payees', async function () { - this.payees.forEach(async (payee, index) => { - (await this.payee(index)).should.be.equal(payee); + await Promise.all(this.payees.map(async (payee, index) => { + (await this.contract.payee(index)).should.be.equal(payee); (await this.contract.released(payee)).should.be.bignumber.equal(0); - }); + })); }); it('should accept payments', async function () {