chore: remove CreateUser from sqlstore & replace with userService.CreateUserForTests (#59910)

This commit is contained in:
Kristin Laemmert
2022-12-07 11:03:22 -05:00
committed by GitHub
parent d036225f7b
commit 70fbf47022
44 changed files with 943 additions and 758 deletions
+16
View File
@@ -0,0 +1,16 @@
package userimpl
import "time"
// timeNow wraps time.Now so it can be mocked in tests.
var timeNow = time.Now
func MockTimeNow(constTime time.Time) {
timeNow = func() time.Time {
return constTime
}
}
func ResetTimeNow() {
timeNow = time.Now
}