Setup test logging

This commit is contained in:
2024-12-19 23:42:19 +01:00
parent cf2e1809a4
commit f0b6aa0d6e
20 changed files with 33 additions and 9 deletions

View File

@@ -1,12 +1,12 @@
package db_test
import (
"database/sql"
"strings"
"testing"
"novamd/internal/db"
"novamd/internal/models"
_ "novamd/internal/testenv"
)
func TestWorkspaceOperations(t *testing.T) {
@@ -385,8 +385,8 @@ func TestWorkspaceOperations(t *testing.T) {
// Verify workspace is gone
_, err = database.GetWorkspaceByID(workspace.ID)
if err != sql.ErrNoRows {
t.Errorf("expected sql.ErrNoRows, got %v", err)
if !strings.Contains(err.Error(), "workspace not found") {
t.Errorf("expected workspace not found, got %v", err)
}
})
}