I have a sign-up endpoint and I want to mock the SQL queries in that endpoint. At one point the password is hashed with bcrypt
and since every bcrypt
hash is unique I can't add that password as an argument.
The mocked query goes something like this:
mock.ExpectExec("INSERT INTO users (.+)").WithArgs("username", "password", "name")
Is there a way just to ignore the arguments or to use some generic in place of password.