update test for ENSSubDomainRegistry
This commit is contained in:
parent
c7b61f52ba
commit
94fcf57fc5
|
@ -6,7 +6,7 @@ exports.Test = (contractsConfig, afterDeploy) => {
|
||||||
var Controlled;
|
var Controlled;
|
||||||
var accountsArr;
|
var accountsArr;
|
||||||
before(function(done) {
|
before(function(done) {
|
||||||
EmbarkSpec.deployAll(contractsConfig, async function(accounts) {
|
config(contractsConfig, async function(accounts) {
|
||||||
Controlled = Contract;
|
Controlled = Contract;
|
||||||
accountsArr = accounts;
|
accountsArr = accounts;
|
||||||
await afterDeploy(accounts, Contract);
|
await afterDeploy(accounts, Contract);
|
||||||
|
|
|
@ -11,7 +11,7 @@ contract('ENS', function () {
|
||||||
var contractsConfig = {
|
var contractsConfig = {
|
||||||
"ENSRegistry": { },
|
"ENSRegistry": { },
|
||||||
};
|
};
|
||||||
EmbarkSpec.deployAll(contractsConfig, function(accounts) {
|
config(contractsConfig, function(accounts) {
|
||||||
ens = ENSRegistry;
|
ens = ENSRegistry;
|
||||||
accountsArr = accounts;
|
accountsArr = accounts;
|
||||||
done()
|
done()
|
||||||
|
|
|
@ -1,26 +1,12 @@
|
||||||
const utils = require('../utils/testUtils.js');
|
const utils = require('../utils/testUtils.js');
|
||||||
const web3Utils = require('web3-utils');
|
const web3Utils = require('web3-utils');
|
||||||
const namehash = require('eth-ens-namehash');
|
const namehash = require('eth-ens-namehash');
|
||||||
|
const TestToken = require('Embark/contracts/TestToken');
|
||||||
|
const ENSRegistry = require('Embark/contracts/ENSRegistry');
|
||||||
|
const PublicResolver = require('Embark/contracts/PublicResolver');
|
||||||
|
const ENSSubdomainRegistry = require('Embark/contracts/ENSSubdomainRegistry');
|
||||||
|
|
||||||
contract('ENSSubdomainRegistry', function () {
|
var contractsConfig = {
|
||||||
this.timeout(0);
|
|
||||||
let domains = {
|
|
||||||
free : {
|
|
||||||
name: 'freedomain.eth',
|
|
||||||
price: 0,
|
|
||||||
namehash: namehash.hash('freedomain.eth')
|
|
||||||
},
|
|
||||||
paid : {
|
|
||||||
name: 'stateofus.eth',
|
|
||||||
price: 100000000,
|
|
||||||
namehash: namehash.hash('stateofus.eth')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let ens;
|
|
||||||
let accountsArr;
|
|
||||||
|
|
||||||
before(function(done) {
|
|
||||||
var contractsConfig = {
|
|
||||||
"TestToken": {
|
"TestToken": {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -56,13 +42,34 @@ contract('ENSSubdomainRegistry', function () {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
EmbarkSpec.deployAll(contractsConfig, async (accounts) => {
|
|
||||||
|
config({ contracts: contractsConfig });
|
||||||
|
|
||||||
|
contract('ENSSubdomainRegistry', function () {
|
||||||
|
//this.timeout(0);
|
||||||
|
let domains = {
|
||||||
|
free : {
|
||||||
|
name: 'freedomain.eth',
|
||||||
|
price: 0,
|
||||||
|
namehash: namehash.hash('freedomain.eth')
|
||||||
|
},
|
||||||
|
paid : {
|
||||||
|
name: 'stateofus.eth',
|
||||||
|
price: 100000000,
|
||||||
|
namehash: namehash.hash('stateofus.eth')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let ens;
|
||||||
|
let accountsArr;
|
||||||
|
|
||||||
|
before(function(done) {
|
||||||
|
web3.eth.getAccounts().then(async (accounts) => {
|
||||||
ens = ENSRegistry;
|
ens = ENSRegistry;
|
||||||
accountsArr = accounts;
|
accountsArr = accounts;
|
||||||
await utils.increaseTime(1 * utils.timeUnits.days) //time cannot start zero
|
await utils.increaseTime(1 * utils.timeUnits.days) //time cannot start zero
|
||||||
done()
|
done();
|
||||||
});
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add free domain', async () => {
|
it('should add free domain', async () => {
|
||||||
|
|
Loading…
Reference in New Issue