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")
	}
}
