MCPcopy
hub / github.com/pocketbase/pocketbase / TestExternalAuthRecordRef

Function TestExternalAuthRecordRef

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

Source from the content-addressed store, hash-verified

37}
38
39func TestExternalAuthRecordRef(t *testing.T) {
40 t.Parallel()
41
42 app, _ := tests.NewTestApp()
43 defer app.Cleanup()
44
45 ea := core.NewExternalAuth(app)
46
47 testValues := []string{"test_1", "test2", ""}
48 for i, testValue := range testValues {
49 t.Run(fmt.Sprintf("%d_%q", i, testValue), func(t *testing.T) {
50 ea.SetRecordRef(testValue)
51
52 if v := ea.RecordRef(); v != testValue {
53 t.Fatalf("Expected getter %q, got %q", testValue, v)
54 }
55
56 if v := ea.GetString("recordRef"); v != testValue {
57 t.Fatalf("Expected field value %q, got %q", testValue, v)
58 }
59 })
60 }
61}
62
63func TestExternalAuthCollectionRef(t *testing.T) {
64 t.Parallel()

Callers

nothing calls this directly

Calls 7

CleanupMethod · 0.95
SetRecordRefMethod · 0.95
RecordRefMethod · 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…