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.