@0x/contracts-staking: Fix contracts formatting.

`@0x/contracts-staking`: Remove typo test suite in `migration.ts`.
`@0x/contracts-staking`: Address minor review comments.
This commit is contained in:
Lawrence Forman
2019-09-09 20:51:55 -04:00
parent 1c2f4906e6
commit 6410366f8b
26 changed files with 27 additions and 31 deletions

View File

@@ -49,7 +49,7 @@ blockchainTests('Migration tests', env => {
...env.txDefaults,
from: ownerAddress,
to: revertAddress,
data: '0x',
data: constants.NULL_BYTES,
value: new BigNumber(1),
}),
);
@@ -114,34 +114,6 @@ blockchainTests('Migration tests', env => {
expect(initCounter).to.bignumber.eq(2);
});
});
blockchainTests.resets('upgrade', async () => {
let proxyContract: TestStakingProxyContract;
before(async () => {
proxyContract = await deployStakingProxyAsync();
});
it('incm', async () => {
const attachedAddress = randomAddress();
const tx = proxyContract.attachStakingContract.awaitTransactionSuccessAsync(attachedAddress, {
from: notOwnerAddress,
});
const expectedError = new OwnableRevertErrors.OnlyOwnerError(notOwnerAddress, ownerAddress);
return expect(tx).to.revertWith(expectedError);
});
it('calls init() and attaches the contract', async () => {
await proxyContract.attachStakingContract.awaitTransactionSuccessAsync(initTargetContract.address);
await assertInitStateAsync(proxyContract);
});
it('reverts if init() reverts', async () => {
await enableInitRevertsAsync();
const tx = proxyContract.attachStakingContract.awaitTransactionSuccessAsync(initTargetContract.address);
return expect(tx).to.revertWith(REVERT_ERROR);
});
});
});
blockchainTests.resets('Staking.init()', async () => {