fix(@embark/core): fix tests as paths have changed again

URLs for test_app files have changed on the remote again, this PR updates the tests to reflect that change.
This commit is contained in:
emizzle 2019-02-13 09:40:41 +11:00 committed by Iuri Matias
parent 401f7bc52f
commit 07ede9017e
5 changed files with 12 additions and 12 deletions

View File

@ -178,7 +178,7 @@ describe('embark.Config', function () {
config.contractsFiles = [];
config.contractsConfig.contracts = [
{
file: 'https://github.com/embark-framework/embark/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol'
file: 'https://github.com/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol'
},
{
file: 'github.com/status-im/contracts/contracts/identity/ERC725.sol'
@ -190,9 +190,9 @@ describe('embark.Config', function () {
const expected = [
{
"type": "http",
"externalUrl": "https://raw.githubusercontent.com/embark-framework/embark/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol",
"path": ".embark/contracts/embark-framework/embark/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol",
"originalPath": ".embark/contracts/embark-framework/embark/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol",
"externalUrl": "https://raw.githubusercontent.com/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol",
"path": ".embark/contracts/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol",
"originalPath": ".embark/contracts/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol",
"pluginPath": '',
"basedir": "",
"importRemappings": [],

View File

@ -1,5 +1,5 @@
pragma solidity ^0.5.0;
import "https://github.com/embark-framework/embark/blob/master/test_dapps/packages/test_apps/contracts_app/contracts/contract_args.sol";
import "https://github.com/embark-framework/embark/blob/master/test_dapps/test_apps/contracts_app/contracts/contract_args.sol";
contract SimpleStorage {
uint public storedData;

View File

@ -7,18 +7,18 @@ describe('embark.utils', function () {
describe('#getExternalContractUrl', function () {
it('should get the right url for a https://github file', function () {
const fileObj = Utils.getExternalContractUrl(
'https://github.com/embark-framework/embark/blob/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol'
'https://github.com/embark-framework/embark/blob/master/test_dapps/test_app/app/contracts/simple_storage.sol'
);
assert.deepEqual(fileObj,
{
filePath: constants.httpContractsDirectory + 'embark-framework/embark/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol',
url: 'https://raw.githubusercontent.com/embark-framework/embark/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol'
filePath: constants.httpContractsDirectory + 'embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol',
url: 'https://raw.githubusercontent.com/embark-framework/embark/master/test_dapps/test_app/app/contracts/simple_storage.sol'
});
});
it('should fail for a malformed https://github file', function () {
const fileObj = Utils.getExternalContractUrl(
'https://github/embark-framework/embark/blob/master/test_dapps/packages/test_app/app/contracts/simple_storage.sol'
'https://github/embark-framework/embark/blob/master/test_dapps/test_app/app/contracts/simple_storage.sol'
);
assert.strictEqual(fileObj, null);
});

View File

@ -1,7 +1,7 @@
pragma solidity ^0.4.17;
import "https://github.com/embark-framework/embark/blob/master/test_dapps/packages/contracts_app/contracts/ownable.sol";
import "https://github.com/embark-framework/embark/blob/master/test_dapps/packages/contracts_app/contracts/contract_args.sol";
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/test_dapps/contracts_app/contracts/contract_args.sol";
contract SimpleStorageWithHttpImport is Ownable {

View File

@ -24,7 +24,7 @@ describe('http contracts', () => {
});
it('should have downloaded the http import in SimpleStorageWithHttpImport', (done) => {
const contractImportPath = '.embark/contracts/embark-framework/embark/master/test_dapps/packages/contracts_app/contracts/ownable.sol';
const contractImportPath = '.embark/contracts/embark-framework/embark/master/test_dapps/contracts_app/contracts/ownable.sol';
fs.access(contractImportPath, (err) => {
if (err) {
assert.fail(contractImportPath + ' was not downloaded');