From 77d1bcf94cdcfbff23361bf1f8945d3eb92b6f3e Mon Sep 17 00:00:00 2001 From: bweick Date: Wed, 13 Jun 2018 10:23:04 -0700 Subject: [PATCH] Changed test set-up to test anti-case of if statement for removeAuthorizedAddress. --- test/authorizable.spec.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/authorizable.spec.ts b/test/authorizable.spec.ts index 9b5c8f891..40a0b4f28 100644 --- a/test/authorizable.spec.ts +++ b/test/authorizable.spec.ts @@ -131,7 +131,11 @@ contract("Authorizable", (accounts) => { beforeEach(async () => { authorizableContract = await coreWrapper.deployAuthorizableAsync(); - await coreWrapper.addAuthorizationAsync(authorizableContract, authorizedAccount); + + const authAccountArray: Address[] = [authAccount1, authAccount2, authorizedAccount]; + for (const account of authAccountArray) { + await coreWrapper.addAuthorizationAsync(authorizableContract, account); + } }); afterEach(async () => { @@ -158,9 +162,8 @@ contract("Authorizable", (accounts) => { it("removes address from authorities array", async () => { await subject(); - const authoritiesArray = await authorizableContract.getAuthorizedAddresses.callAsync(); - - expect(authoritiesArray.length).to.eql(0); + const newAuthoritiesArray = await authorizableContract.getAuthorizedAddresses.callAsync(); + expect(newAuthoritiesArray).to.not.include(addressToRemove); }); it("emits correct AuthorizedAddressRemoved log", async () => {