MCPcopy
hub / github.com/pocketbase/pocketbase / TestExternalAuthCollectionRef

Function TestExternalAuthCollectionRef

core/external_auth_model_test.go:63–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestExternalAuthCollectionRef(t *testing.T) {
64 t.Parallel()
65
66 app, _ := tests.NewTestApp()
67 defer app.Cleanup()
68
69 ea := core.NewExternalAuth(app)
70
71 testValues := []string{"test_1", "test2", ""}
72 for i, testValue := range testValues {
73 t.Run(fmt.Sprintf("%d_%q", i, testValue), func(t *testing.T) {
74 ea.SetCollectionRef(testValue)
75
76 if v := ea.CollectionRef(); v != testValue {
77 t.Fatalf("Expected getter %q, got %q", testValue, v)
78 }
79
80 if v := ea.GetString("collectionRef"); v != testValue {
81 t.Fatalf("Expected field value %q, got %q", testValue, v)
82 }
83 })
84 }
85}
86
87func TestExternalAuthProvider(t *testing.T) {
88 t.Parallel()

Callers

nothing calls this directly

Calls 7

CleanupMethod · 0.95
SetCollectionRefMethod · 0.95
CollectionRefMethod · 0.95
NewTestAppFunction · 0.92
NewExternalAuthFunction · 0.92
GetStringMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…