Files
amcs/internal/app/llm_test.go
Hein 8d0a91a961 feat(llm): add LLM integration instructions and handler
* Serve LLM instructions at `/llm`
* Include markdown content for memory instructions
* Update README with LLM integration details
* Add tests for LLM instructions handler
* Modify database migrations to use GUIDs for thoughts and projects
2026-03-25 18:02:42 +02:00

30 lines
734 B
Go

package app
import (
"net/http"
"net/http/httptest"
"testing"
amcsllm "git.warky.dev/wdevs/amcs/llm"
)
func TestServeLLMInstructions(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/llm", nil)
rec := httptest.NewRecorder()
serveLLMInstructions(rec, req)
res := rec.Result()
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
t.Fatalf("status = %d, want %d", res.StatusCode, http.StatusOK)
}
if got := res.Header.Get("Content-Type"); got != "text/markdown; charset=utf-8" {
t.Fatalf("content-type = %q, want %q", got, "text/markdown; charset=utf-8")
}
if body := rec.Body.String(); body != string(amcsllm.MemoryInstructions) {
t.Fatalf("body = %q, want embedded instructions", body)
}
}