Files
pages/internal/server/task_calendar_capture_test.go
T
Anya Tokugawa b4792bb175
Build and publish container images / images (push) Successful in 16m37s
Add task capture, work reports, daily digests and private contacts
2026-11-01 22:28:16 +09:00

27 lines
632 B
Go

package server
import (
"context"
"github.com/google/uuid"
"testing"
)
func TestTaskCalendarCapture(t *testing.T) {
s, token, domain, actor := taskFixture(t)
repo, e := s.calendars()
if e != nil {
t.Fatal(e)
}
c, e := repo.Create(context.Background(), domain, actor, "Command calendar", "local")
if e != nil {
t.Fatal(e)
}
input := map[string]any{"request_id": uuid.NewString(), "calendar_uuid": c.ID, "title": "会議", "from": "2026-11-02T09:00", "to": "2026-11-02T10:00"}
for range 2 {
w := taskRequest(s, token, "POST", "calendar-capture", input, "")
if w.Code != 201 {
t.Fatal(w.Code, w.Body)
}
}
}