MCPcopy Create free account
hub / github.com/openclaw/gogcli / TestDeletePlanning

Function TestDeletePlanning

internal/sheetsconditional/conditional_test.go:93–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

91}
92
93func TestDeletePlanning(t *testing.T) {
94 requests, err := BuildDeleteRequests(7, 3, "", true)
95 if err != nil {
96 t.Fatalf("BuildDeleteRequests() error = %v", err)
97 }
98
99 if len(requests) != 3 ||
100 requests[0].DeleteConditionalFormatRule.Index != 2 ||
101 requests[2].DeleteConditionalFormatRule.Index != 0 {
102 t.Fatalf("requests = %#v", requests)
103 }
104
105 if _, err := BuildDeleteRequests(7, 2, "2", false); err == nil ||
106 !strings.Contains(err.Error(), "out of range") {
107 t.Fatalf("out-of-range error = %v", err)
108 }
109
110 if err := ValidateClearIndex("-1"); err == nil {
111 t.Fatal("expected invalid index")
112 }
113}
114
115func TestSheetRuleCount(t *testing.T) {
116 spreadsheet := &sheets.Spreadsheet{

Callers

nothing calls this directly

Calls 3

BuildDeleteRequestsFunction · 0.85
ValidateClearIndexFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected