ultisuite-backend/internal/nextcloud/ultichat_paths_test.go
R3D347HR4Y 0466a1c169
Some checks are pending
CI / Go tests (push) Waiting to run
CI / Integration tests (push) Waiting to run
CI / DB migrations (push) Waiting to run
wow
2026-06-11 01:22:52 +02:00

21 lines
548 B
Go

package nextcloud
import "testing"
func TestChatSidecarPath(t *testing.T) {
got := ChatSidecarPath("/.ultimail/ai/chats", "abc-123")
want := "/.ultimail/ai/chats/abc-123.ultichat.json"
if got != want {
t.Fatalf("ChatSidecarPath() = %q, want %q", got, want)
}
}
func TestIsUltichatSidecarPath(t *testing.T) {
if !IsUltichatSidecarPath("/.ultimail/ai/chats/foo.ultichat.json") {
t.Fatal("expected ultichat sidecar path")
}
if IsUltichatSidecarPath("/docs/report.ultidoc.json") {
t.Fatal("ultidoc path should not match ultichat")
}
}