refactor: shorten model and table prefixes
This commit is contained in:
@@ -48,7 +48,7 @@ func TestLoginHandlerReturnsSessionToken(t *testing.T) {
|
||||
func TestLoginHandlerRejectsInvalidCredentials(t *testing.T) {
|
||||
newTestDB(t)
|
||||
service := auth.NewService("test-secret")
|
||||
require.NoError(t, models.DBService.Create(&models.SenlinAgentUser{Email: "demo@senlin.ai", DisplayName: "Demo User", PasswordHash: "not-a-bcrypt-hash"}).Error)
|
||||
require.NoError(t, models.DBService.Create(&models.SaUser{Email: "demo@senlin.ai", DisplayName: "Demo User", PasswordHash: "not-a-bcrypt-hash"}).Error)
|
||||
router := httpx.NewProtectedRouter(config.Config{Env: "test"}, service.VerifySession, auth.NewHandler(service))
|
||||
|
||||
body, err := json.Marshal(gin.H{"email": "demo@senlin.ai", "password": "wrong"})
|
||||
|
||||
Reference in New Issue
Block a user