2018-04-18 18:56:18 +00:00
|
|
|
/*globals describe, it*/
|
|
|
|
const fs = require('fs-extra');
|
|
|
|
const assert = require('assert');
|
|
|
|
|
|
|
|
describe('http contracts', () => {
|
|
|
|
|
2018-04-19 19:13:41 +00:00
|
|
|
it('should have downloaded the file in .embark/contracts', (done) => {
|
2018-09-14 19:21:45 +00:00
|
|
|
const contractPath = '.embark/contracts/status-im/contracts/151-embark31/contracts/token/StandardToken.sol';
|
2018-04-19 19:13:41 +00:00
|
|
|
fs.access(contractPath, (err) => {
|
|
|
|
if (err) {
|
|
|
|
assert.fail(contractPath + ' was not downloaded');
|
|
|
|
}
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should have downloaded the file import file too', (done) => {
|
2018-09-14 19:21:45 +00:00
|
|
|
const contractImportPath = '.embark/contracts/status-im/contracts/151-embark31/contracts/token/ERC20Token.sol';
|
2018-04-19 19:13:41 +00:00
|
|
|
fs.access(contractImportPath, (err) => {
|
|
|
|
if (err) {
|
2018-04-20 15:39:17 +00:00
|
|
|
assert.fail(contractImportPath + ' was not downloaded');
|
|
|
|
}
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should have downloaded the http import in SimpleStorageWithHttpImport', (done) => {
|
2018-11-09 09:38:58 +00:00
|
|
|
const contractImportPath = '.embark/contracts/embark-framework/embark/master/test_apps/contracts_app/contracts/ownable.sol';
|
2018-04-20 15:39:17 +00:00
|
|
|
fs.access(contractImportPath, (err) => {
|
|
|
|
if (err) {
|
|
|
|
assert.fail(contractImportPath + ' was not downloaded');
|
2018-04-19 19:13:41 +00:00
|
|
|
}
|
|
|
|
done();
|
2018-04-18 18:56:18 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|