aboutsummaryrefslogtreecommitdiffstats
path: root/test/schema_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-22 01:06:13 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-22 17:00:44 +0800
commit52ac8c225181a3252553b3c47d61719542a5e319 (patch)
tree6ea90fdc6141af00e73c23fc5c3d77dbd16e8907 /test/schema_test.ts
parente376189bc69682b2445f344966332c63d8e9fa4d (diff)
downloaddexon-sol-tools-52ac8c225181a3252553b3c47d61719542a5e319.tar
dexon-sol-tools-52ac8c225181a3252553b3c47d61719542a5e319.tar.gz
dexon-sol-tools-52ac8c225181a3252553b3c47d61719542a5e319.tar.bz2
dexon-sol-tools-52ac8c225181a3252553b3c47d61719542a5e319.tar.lz
dexon-sol-tools-52ac8c225181a3252553b3c47d61719542a5e319.tar.xz
dexon-sol-tools-52ac8c225181a3252553b3c47d61719542a5e319.tar.zst
dexon-sol-tools-52ac8c225181a3252553b3c47d61719542a5e319.zip
Reject checksummed addresses
Diffstat (limited to 'test/schema_test.ts')
-rw-r--r--test/schema_test.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/schema_test.ts b/test/schema_test.ts
index 1fac2b380..d791ece24 100644
--- a/test/schema_test.ts
+++ b/test/schema_test.ts
@@ -42,11 +42,15 @@ describe('Schema', () => {
});
describe('#addressSchema', () => {
it('should validate valid addresses', () => {
- const testCases = ['0x8b0292B11a196601eD2ce54B665CaFEca0347D42', constants.NULL_ADDRESS];
+ const testCases = ['0x8b0292b11a196601ed2ce54b665cafeca0347d42', constants.NULL_ADDRESS];
validateAgainstSchema(testCases, addressSchema);
});
it('should fail for invalid addresses', () => {
- const testCases = ['0x', '0', '0x00', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42'];
+ const testCases = [
+ '0x',
+ '0',
+ '0x00',
+ '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42', '0x8b0292B11a196601eD2ce54B665CaFEca0347D42'];
const shouldFail = true;
validateAgainstSchema(testCases, addressSchema, shouldFail);
});
@@ -159,7 +163,7 @@ describe('Schema', () => {
name: 'Zero Ex',
symbol: 'ZRX',
decimals: 100500,
- address: '0x8b0292B11a196601eD2ce54B665CaFEca0347D42',
+ address: '0x8b0292b11a196601ed2ce54b665cafeca0347d42',
url: 'https://0xproject.com',
};
it('should validate valid token', () => {