diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-20 11:17:19 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-20 11:17:19 -1000 |
| commit | 07ba815e8517ee2d3a5fa531361bbd09bdfcbaa7 (patch) | |
| tree | ca9d9be0f02d5a724a3646f87d4a9f50203249cc /test/acceptance_test.go | |
| parent | 6a59098c3096f5ebd3a61ef5268cbd480b0f1519 (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 'test/acceptance_test.go')
| -rw-r--r-- | test/acceptance_test.go | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/test/acceptance_test.go b/test/acceptance_test.go index eee837e..ca672c3 100644 --- a/test/acceptance_test.go +++ b/test/acceptance_test.go @@ -65,7 +65,7 @@ func setupTestServer(t *testing.T) (*httptest.Server, *store.Store, func()) { } // Initialize handlers - h := handlers.New(db, todoistClient, trelloClient, nil, nil, cfg) + h := handlers.New(db, todoistClient, trelloClient, nil, cfg) // Set up router (same as main.go) r := chi.NewRouter() @@ -77,7 +77,6 @@ func setupTestServer(t *testing.T) (*httptest.Server, *store.Store, func()) { r.Get("/", h.HandleDashboard) r.Post("/api/refresh", h.HandleRefresh) r.Get("/api/tasks", h.HandleGetTasks) - r.Get("/api/notes", h.HandleGetNotes) r.Get("/api/meals", h.HandleGetMeals) r.Get("/api/boards", h.HandleGetBoards) @@ -211,29 +210,6 @@ func TestFullWorkflow(t *testing.T) { // The response can be either success message or dashboard data }) - // Test 4: GET /api/notes (should return empty when no Obsidian client) - t.Run("GetNotesEmpty", func(t *testing.T) { - resp, err := http.Get(server.URL + "/api/notes") - if err != nil { - t.Fatalf("Failed to get notes: %v", err) - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - t.Errorf("Expected status 200, got %d", resp.StatusCode) - } - - var notes []models.Note - if err := json.NewDecoder(resp.Body).Decode(¬es); err != nil { - t.Fatalf("Failed to decode notes: %v", err) - } - - if len(notes) != 0 { - t.Errorf("Expected 0 notes (no Obsidian client), got %d", len(notes)) - } - }) - - // Test 5: GET /api/meals (should return empty when no PlanToEat client) t.Run("GetMealsEmpty", func(t *testing.T) { resp, err := http.Get(server.URL + "/api/meals") if err != nil { @@ -255,7 +231,7 @@ func TestFullWorkflow(t *testing.T) { } }) - // Test 6: GET / (Dashboard) + // Test 5: GET / (Dashboard) t.Run("GetDashboard", func(t *testing.T) { resp, err := http.Get(server.URL + "/") if err != nil { |
