(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestNewMemoryDatabase(t *testing.T) { |
| 36 | t.Parallel() |
| 37 | db := setupTestDB(t) |
| 38 | |
| 39 | assert.NotNil(t, db, "Database should be created successfully") |
| 40 | |
| 41 | db, err := NewMemoryDatabase("/:invalid:path") |
| 42 | require.NoError(t, err, "constructor should not touch the filesystem") |
| 43 | err = db.AddMemory(t.Context(), database.UserMemory{ID: "1", CreatedAt: time.Now().Format(time.RFC3339), Memory: "x"}) |
| 44 | require.Error(t, err, "Should fail with invalid database path") |
| 45 | } |
| 46 | |
| 47 | func TestAddMemory(t *testing.T) { |
| 48 | t.Parallel() |
nothing calls this directly
no test coverage detected