Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
@0x/contracts-asset-proxy: Minor ERC20BridgeProxy test changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dorothy-zbornak committed Oct 1, 2019
1 parent 737ad58 commit 579dba1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/asset-proxy/test/erc20bridge_proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Numberish,
randomAddress,
} from '@0x/contracts-test-utils';
import { AssetProxyId } from '@0x/types';
import { AbiEncoder, AuthorizableRevertErrors, BigNumber, StringRevertError } from '@0x/utils';
import { DecodedLogs } from 'ethereum-types';
import * as _ from 'lodash';
Expand All @@ -21,7 +22,7 @@ import {
} from '../src';

blockchainTests.resets('ERC20BridgeProxy unit tests', env => {
const PROXY_ID = '0xdc1600f3';
const PROXY_ID = AssetProxyId.ERC20Bridge;
const BRIDGE_SUCCESS_RETURN_DATA = hexRightPad(PROXY_ID);
let owner: string;
let badCaller: string;
Expand Down Expand Up @@ -141,7 +142,7 @@ blockchainTests.resets('ERC20BridgeProxy unit tests', env => {
return (logs as any) as DecodedLogs;
}

it('succeeds if the bridge succeeds and balance increases', async () => {
it('succeeds if the bridge succeeds and balance increases by `amount`', async () => {
const tx = transferFromAsync();
return expect(tx).to.be.fulfilled('');
});
Expand Down Expand Up @@ -248,7 +249,7 @@ blockchainTests.resets('ERC20BridgeProxy unit tests', env => {
return expect(tx).to.revertWith(revertError);
});

it('fails if balance of `to` increases by `amount - 1`', async () => {
it('fails if balance of `to` increases by less than `amount`', async () => {
const amount = getRandomInteger(1, 100e18);
const tx = transferFromAsync({
amount,
Expand Down

0 comments on commit 579dba1

Please sign in to comment.