I have 3 failing tests, of 8 total, all work on first contract, none on the second. any insights why i can get a remix 'success' on the contract, and a test failure with revert?

[github link:] (https://github.com/shaddow1201/CredentialVerify)
[error shown:] (https://www.screencast.com/t/KOizhm55HX)

2_deploy_contracts.js detail:
var CredentialOrgFactory = artifacts.require("CredentialOrgFactory");
var CredentialFactory = artifacts.require("CredentialFactory");
//var ApplicantFactory = artifacts.require("ApplicantFactory");
//var ProcessCredentials = artifacts.require("ProcessCredentials");

module.exports = function(deployer) {

1 Answer 1


You have the function only callable by the owner of the contract, which is reverting. Plus, it has no value with a view function.

  • aren't the tests ran using the owner?
    – shaddow
    Aug 5, 2018 at 17:29
  • They are run using the first account in the array, if you are deploying the contract from a factory, the factory is the owner of the contract. The msg.sender will be whoever deployed it.
    – Daniel R
    Aug 5, 2018 at 17:30
  • thanks! that helped! changed to functions to public and the tests passed. Appreciate.
    – shaddow
    Aug 5, 2018 at 17:40
  • Thanks, if you found the answer useful could you accept my answer please?
    – Daniel R
    Aug 5, 2018 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.