aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc/test
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-doc/test')
-rw-r--r--packages/sol-doc/test/solidity_doc_generator_test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/sol-doc/test/solidity_doc_generator_test.ts b/packages/sol-doc/test/solidity_doc_generator_test.ts
index 989f29320..7f11fcdfd 100644
--- a/packages/sol-doc/test/solidity_doc_generator_test.ts
+++ b/packages/sol-doc/test/solidity_doc_generator_test.ts
@@ -3,6 +3,8 @@ import * as _ from 'lodash';
import * as chai from 'chai';
import 'mocha';
+import { SolidityMethod } from '@0xproject/types';
+
import { generateSolDocAsync } from '../src/solidity_doc_generator';
import { chaiSetup } from './util/chai_setup';
@@ -55,5 +57,20 @@ describe('#SolidityDocGenerator', () => {
throw new Error('events should never be undefined');
}
expect(doc.ERC20Basic.events.length).to.equal(erc20BasicEventCount);
+
+ let addAuthorizedAddressMethod: SolidityMethod | undefined;
+ for (const method of doc.TokenTransferProxy.methods) {
+ if (method.name === 'addAuthorizedAddress') {
+ addAuthorizedAddressMethod = method;
+ }
+ }
+ expect(
+ addAuthorizedAddressMethod,
+ `method addAuthorizedAddress not found in ${JSON.stringify(doc.TokenTransferProxy.methods)}`,
+ ).to.not.be.undefined();
+ const tokenTransferProxyAddAuthorizedAddressComment = 'Authorizes an address.';
+ expect((addAuthorizedAddressMethod as SolidityMethod).comment).to.equal(
+ tokenTransferProxyAddAuthorizedAddressComment,
+ );
});
});