Skip to content

Test using revertedWith function passes correctly despite other message #1471

@SebaBau

Description

@SebaBau

In my contract first modifier in function check if user is contract owner. The next require check another custom business logic. In my tests I simulate transaction using connect() funtion and pass other wallet (not owner). In this tests I check in revertedWith funtion revert message. Test passes correctly despite using a completely different error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions