Skip to content

Commit

Permalink
fixes some test configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrunic committed Jul 7, 2018
1 parent 914db2d commit 97f7c12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
4 changes: 2 additions & 2 deletions tasks/contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export function compile() {

export function test(testName) {
if (!testName) {
testName = '*';
testName = 'test/*';
}
run(
`docker-compose run --rm backend truffle "test ${testName}"`
`docker-compose run --rm backend truffle test ${testName}`
);
}

Expand Down
19 changes: 5 additions & 14 deletions test/application.js → test/test_application_contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,21 @@ contract('Application', function(accounts) {
let contract;

it('should update storage contract address', function() {
Application.deployed()
return Application.deployed()
.then(
function(_contract) {
(_contract) => {
contract = _contract;
return contract.getStorageAddress();
return contract.setStorageAddress(accounts[0]);
}
)
.then(
function() {
return contract.setStorageAddress(accounts[0]);
}
).then(
function() {
() => {
return contract.getStorageAddress();
}
).then(
function(newStorageAddress) {
(newStorageAddress) => {
return assert.equal(newStorageAddress, accounts[0]);
}
).catch(
function(error) {
console.log('error:', error);
return assert.fail(0, 1);
}
);

});
Expand Down

0 comments on commit 97f7c12

Please sign in to comment.