0

I have this test, it clearly shouldn't pass:

contract("Exams", function(accounts) {
   it("should keep the contract owner", function() {
       // var expectedValue = "0x67F4CfB03aA5E2E71De1470ae26adB7e33B7892E";

       console.log(accounts[0]);

       Exam.deployed()
           .then(instance => instance.getContractOwner.call(accounts[0]))
           .then(address => {
               console.log("address:");
               console.log(address);
                assert.equal(
                    address, "xxxxx"  // THIS IS NOT THE VALUE
                )
           })
   });
});

I get the following logs:

safaltaya@safaltaya-HP-ENVY-m7-Notebook-PC:~/Proyectos/ExamRegsitry$ truffle test Using network 'development'.

Compiling your contracts...

Everything is up to date, there is nothing to compile.

Contract: Exams 0x67F4CfB03aA5E2E71De1470ae26adB7e33B7892E ✓ should keep the contract owner

1 passing (47ms)

I ran truffle migrate, connected truffle to ganache.

I don't now how to debug this. I am new to solidity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.