mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-10 22:05:55 +00:00
fix: revise test urls to reflect test_dapps/ -> dapps/tests/
This commit is contained in:
parent
73a06725ac
commit
eb1b6933af
@ -1,8 +1,7 @@
|
|||||||
pragma solidity ^0.4.17;
|
pragma solidity ^0.4.17;
|
||||||
|
|
||||||
import "https://github.com/embark-framework/embark/blob/master/test_dapps/contracts_app/contracts/ownable.sol";
|
import "https://github.com/embark-framework/embark/blob/master/dapps/tests/contracts/contracts/ownable.sol";
|
||||||
import "https://github.com/embark-framework/embark/blob/master/test_dapps/contracts_app/contracts/contract_args.sol";
|
import "https://github.com/embark-framework/embark/blob/master/dapps/tests/contracts/contracts/contract_args.sol";
|
||||||
|
|
||||||
|
|
||||||
contract SimpleStorageWithHttpImport is Ownable {
|
contract SimpleStorageWithHttpImport is Ownable {
|
||||||
uint public storedData;
|
uint public storedData;
|
||||||
|
@ -24,7 +24,7 @@ describe('http contracts', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have downloaded the http import in SimpleStorageWithHttpImport', (done) => {
|
it('should have downloaded the http import in SimpleStorageWithHttpImport', (done) => {
|
||||||
const contractImportPath = '.embark/contracts/embark-framework/embark/master/test_dapps/contracts_app/contracts/ownable.sol';
|
const contractImportPath = '.embark/contracts/embark-framework/embark/master/dapps/tests/contracts/contracts/ownable.sol';
|
||||||
fs.access(contractImportPath, (err) => {
|
fs.access(contractImportPath, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
assert.fail(contractImportPath + ' was not downloaded');
|
assert.fail(contractImportPath + ' was not downloaded');
|
||||||
|
@ -179,7 +179,7 @@ describe('embark.Config', function () {
|
|||||||
config.contractsFiles = [];
|
config.contractsFiles = [];
|
||||||
config.contractsConfig.contracts = [
|
config.contractsConfig.contracts = [
|
||||||
{
|
{
|
||||||
file: 'https://github.com/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol'
|
file: 'https://github.com/embark-framework/embark/blob/master/dapps/templates/demo/contracts/simple_storage.sol'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
file: 'github.com/status-im/contracts/contracts/identity/ERC725.sol'
|
file: 'github.com/status-im/contracts/contracts/identity/ERC725.sol'
|
||||||
@ -191,9 +191,9 @@ describe('embark.Config', function () {
|
|||||||
const expected = [
|
const expected = [
|
||||||
{
|
{
|
||||||
"type": "http",
|
"type": "http",
|
||||||
"externalUrl": "https://raw.githubusercontent.com/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol",
|
"externalUrl": "https://raw.githubusercontent.com/embark-framework/embark/master/dapps/templates/demo/contracts/simple_storage.sol",
|
||||||
"path": fs.dappPath(".embark/contracts/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol"),
|
"path": fs.dappPath(".embark/contracts/embark-framework/embark/master/dapps/templates/demo/contracts/simple_storage.sol"),
|
||||||
"originalPath": ".embark/contracts/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol",
|
"originalPath": ".embark/contracts/embark-framework/embark/master/dapps/templates/demo/contracts/simple_storage.sol",
|
||||||
"pluginPath": '',
|
"pluginPath": '',
|
||||||
"basedir": "",
|
"basedir": "",
|
||||||
"importRemappings": [],
|
"importRemappings": [],
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
pragma solidity ^0.5.0;
|
pragma solidity ^0.5.0;
|
||||||
import "https://github.com/embark-framework/embark/blob/master/test_dapps/test_apps/contracts_app/contracts/contract_args.sol";
|
|
||||||
|
import "https://github.com/embark-framework/embark/blob/master/dapps/tests/contracts/contracts/contract_args.sol";
|
||||||
|
|
||||||
contract SimpleStorage {
|
contract SimpleStorage {
|
||||||
uint public storedData;
|
uint public storedData;
|
||||||
|
|
||||||
@ -16,4 +18,3 @@ contract SimpleStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ const fs = require("../lib/core/fs");
|
|||||||
describe('embark.File', function () {
|
describe('embark.File', function () {
|
||||||
describe('Read file contents', function () {
|
describe('Read file contents', function () {
|
||||||
it('should be able to download a file when type is "http"', async () => {
|
it('should be able to download a file when type is "http"', async () => {
|
||||||
const file = new File({externalUrl: 'https://raw.githubusercontent.com/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol', type: Types.http});
|
const file = new File({externalUrl: 'https://raw.githubusercontent.com/embark-framework/embark/master/dapps/tests/app/app/contracts/simple_storage.sol', type: Types.http});
|
||||||
const content = await file.content;
|
const content = await file.content;
|
||||||
|
|
||||||
expect(content).to.be.ok; //eslint-disable-line
|
expect(content).to.be.ok; //eslint-disable-line
|
||||||
|
@ -7,18 +7,18 @@ describe('embark.utils', function () {
|
|||||||
describe('#getExternalContractUrl', function () {
|
describe('#getExternalContractUrl', function () {
|
||||||
it('should get the right url for a https://github file', function () {
|
it('should get the right url for a https://github file', function () {
|
||||||
const fileObj = Utils.getExternalContractUrl(
|
const fileObj = Utils.getExternalContractUrl(
|
||||||
'https://github.com/embark-framework/embark/blob/master/test_dapps/test_app/app/contracts/simple_storage.sol'
|
'https://github.com/embark-framework/embark/blob/master/dapps/templates/demo/contracts/simple_storage.sol'
|
||||||
);
|
);
|
||||||
assert.deepEqual(fileObj,
|
assert.deepEqual(fileObj,
|
||||||
{
|
{
|
||||||
filePath: constants.httpContractsDirectory + 'embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol',
|
filePath: constants.httpContractsDirectory + 'embark-framework/embark/master/dapps/templates/demo/contracts/simple_storage.sol',
|
||||||
url: 'https://raw.githubusercontent.com/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol'
|
url: 'https://raw.githubusercontent.com/embark-framework/embark/master/dapps/templates/demo/contracts/simple_storage.sol'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should fail for a malformed https://github file', function () {
|
it('should fail for a malformed https://github file', function () {
|
||||||
const fileObj = Utils.getExternalContractUrl(
|
const fileObj = Utils.getExternalContractUrl(
|
||||||
'https://github/embark-framework/embark/blob/master/test_dapps/test_app/app/contracts/simple_storage.sol'
|
'https://github/embark-framework/embark/blob/master/dapps/templates/demo/contracts/simple_storage.sol'
|
||||||
);
|
);
|
||||||
assert.strictEqual(fileObj, null);
|
assert.strictEqual(fileObj, null);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user