summaryrefslogtreecommitdiff
path: root/internal/handlers/handlers_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-20 11:17:19 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-20 11:17:19 -1000
commit07ba815e8517ee2d3a5fa531361bbd09bdfcbaa7 (patch)
treeca9d9be0f02d5a724a3646f87d4a9f50203249cc /internal/handlers/handlers_test.go
parent6a59098c3096f5ebd3a61ef5268cbd480b0f1519 (diff)
Remove Obsidian integration for public server deployment
Obsidian relied on local filesystem access which is incompatible with public server deployment. This removes all Obsidian-related code including: - API client and interface - Store layer methods (SaveNotes, GetNotes, SearchNotes) - Handler methods and routes - UI tab and templates - Configuration fields - Related tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/handlers/handlers_test.go')
-rw-r--r--internal/handlers/handlers_test.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go
index 1aa72cc..6e9346a 100644
--- a/internal/handlers/handlers_test.go
+++ b/internal/handlers/handlers_test.go
@@ -353,41 +353,6 @@ func TestHandleRefresh(t *testing.T) {
// The important thing is the handler doesn't error
}
-// TestHandleGetNotes tests the HandleGetNotes handler
-func TestHandleGetNotes(t *testing.T) {
- db, cleanup := setupTestDB(t)
- defer cleanup()
-
- // Test with nil client should return empty array
- cfg := &config.Config{
- CacheTTLMinutes: 5,
- }
- h := &Handler{
- store: db,
- obsidianClient: nil,
- config: cfg,
- }
-
- req := httptest.NewRequest("GET", "/api/notes", nil)
- w := httptest.NewRecorder()
-
- h.HandleGetNotes(w, req)
-
- if w.Code != http.StatusOK {
- t.Errorf("Expected status 200, got %d", w.Code)
- }
-
- var notes []models.Note
- if err := json.NewDecoder(w.Body).Decode(&notes); err != nil {
- t.Fatalf("Failed to decode response: %v", err)
- }
-
- // Handler returns empty array when client is nil
- if len(notes) != 0 {
- t.Errorf("Expected 0 notes when client is nil, got %d", len(notes))
- }
-}
-
// TestHandleGetMeals tests the HandleGetMeals handler
func TestHandleGetMeals(t *testing.T) {
db, cleanup := setupTestDB(t)