MCPcopy
hub / github.com/pocketbase/pocketbase / TestCollectionIsAuth

Function TestCollectionIsAuth

core/collection_model_test.go:406–429  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

404}
405
406func TestCollectionIsAuth(t *testing.T) {
407 t.Parallel()
408
409 scenarios := []struct {
410 typ string
411 expected bool
412 }{
413 {"unknown", false},
414 {core.CollectionTypeBase, false},
415 {core.CollectionTypeView, false},
416 {core.CollectionTypeAuth, true},
417 }
418
419 for _, s := range scenarios {
420 t.Run(s.typ, func(t *testing.T) {
421 c := core.Collection{}
422 c.Type = s.typ
423
424 if v := c.IsAuth(); v != s.expected {
425 t.Fatalf("Expected %v, got %v", s.expected, v)
426 }
427 })
428 }
429}
430
431func TestCollectionPostScan(t *testing.T) {
432 t.Parallel()

Callers

nothing calls this directly

Calls 2

IsAuthMethod · 0.95
RunMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…