Files
go-onlyoffice/cmd/office/fetch/fetch_integration_test.go
T
eSliderandCursor f8a73edef3 feat(office): add Workspace TUI with shared bootstrap and test suite
Introduce the office Bubble Tea browser (module tree, multi-select lists,
markdown preview) alongside oo, with cmd/internal/bootstrap for shared auth,
unit tests across preview/model/ui/fetch, CI build for both binaries, and
GoReleaser archives for office.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 16:29:04 +01:00

46 lines
1.1 KiB
Go

//go:build integration
package fetch_test
import (
"context"
"os"
"testing"
"github.com/eslider/go-onlyoffice/cmd/internal/bootstrap"
"github.com/eslider/go-onlyoffice/cmd/office/fetch"
"github.com/eslider/go-onlyoffice/cmd/office/model"
)
func TestIntegrationListProjects(t *testing.T) {
if os.Getenv("ONLYOFFICE_URL") == "" && os.Getenv("ONLYOFFICE_HOST") == "" {
t.Skip("ONLYOFFICE_URL not set")
}
client, err := bootstrap.NewClient(context.Background())
if err != nil {
t.Fatal(err)
}
loader := &fetch.Loader{Client: client}
items, err := loader.List(context.Background(), model.SubjectProjects)
if err != nil {
t.Fatal(err)
}
t.Logf("projects: %d", len(items))
}
func TestIntegrationListMailInbox(t *testing.T) {
if os.Getenv("ONLYOFFICE_URL") == "" && os.Getenv("ONLYOFFICE_HOST") == "" {
t.Skip("ONLYOFFICE_URL not set")
}
client, err := bootstrap.NewClient(context.Background())
if err != nil {
t.Fatal(err)
}
loader := &fetch.Loader{Client: client}
items, err := loader.List(context.Background(), model.SubjectMailInbox)
if err != nil {
t.Fatal(err)
}
t.Logf("mail messages: %d", len(items))
}