MCPcopy
hub / github.com/rilldata/rill / TestValidateSlug

Function TestValidateSlug

admin/database/validate_test.go:13–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11}
12
13func TestValidateSlug(t *testing.T) {
14 require.NoError(t, Validate(&slugTester{Name: "helloworld"}))
15 require.NoError(t, Validate(&slugTester{Name: "_hello-world"}))
16 require.NoError(t, Validate(&slugTester{Name: "ab"}))
17 require.Error(t, Validate(&slugTester{Name: ""}))
18 require.Error(t, Validate(&slugTester{Name: "hello world"}))
19 require.Error(t, Validate(&slugTester{Name: "-hello"}))
20}

Callers

nothing calls this directly

Calls 2

ValidateFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected