ardanlabs / service

Starter-kit for writing services in Go using Kubernetes.
https://www.ardanlabs.com
Apache License 2.0
3.4k stars 613 forks source link

Fixing bug with sql #368

Closed Ali-Farhadnia closed 1 month ago

Ali-Farhadnia commented 1 month ago

I found this bug when adding a test to check if the 'enabled' field is updated or not, but I cannot find a good way to test whether the user password and password confirmation fields have been updated.

ardan-bkennedy commented 1 month ago

I just started a road trip so I won't get to this for a day. You have two choices on the password. I think you get back the password hash, though I have to check. Assuming you do, you either check that it changed or you made a copy of the hash function, run the user:pass through it and check that it matches.

ardan-bkennedy commented 1 month ago

I pushed a change for this, please check it out. If it's good please close the PR. GREAT CATCH!

Ali-Farhadnia commented 1 month ago

That's great.