summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/acceptance_test.go28
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(&notes); 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 {