update test for ENSSubDomainRegistry
This commit is contained in:
parent
c7b61f52ba
commit
94fcf57fc5
|
@ -6,7 +6,7 @@ exports.Test = (contractsConfig, afterDeploy) => {
|
|||
var Controlled;
|
||||
var accountsArr;
|
||||
before(function(done) {
|
||||
EmbarkSpec.deployAll(contractsConfig, async function(accounts) {
|
||||
config(contractsConfig, async function(accounts) {
|
||||
Controlled = Contract;
|
||||
accountsArr = accounts;
|
||||
await afterDeploy(accounts, Contract);
|
||||
|
|
|
@ -11,7 +11,7 @@ contract('ENS', function () {
|
|||
var contractsConfig = {
|
||||
"ENSRegistry": { },
|
||||
};
|
||||
EmbarkSpec.deployAll(contractsConfig, function(accounts) {
|
||||
config(contractsConfig, function(accounts) {
|
||||
ens = ENSRegistry;
|
||||
accountsArr = accounts;
|
||||
done()
|
||||
|
|
|
@ -1,26 +1,12 @@
|
|||
const utils = require('../utils/testUtils.js');
|
||||
const web3Utils = require('web3-utils');
|
||||
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 () {
|
||||
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 = {
|
||||
var contractsConfig = {
|
||||
"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;
|
||||
accountsArr = accounts;
|
||||
await utils.increaseTime(1 * utils.timeUnits.days) //time cannot start zero
|
||||
done()
|
||||
});
|
||||
done();
|
||||
})
|
||||
});
|
||||
|
||||
it('should add free domain', async () => {
|
||||
|
|
Loading…
Reference in New Issue