MCPcopy
hub / github.com/pocketbase/pocketbase / TestExternalAuthProviderId

Function TestExternalAuthProviderId

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

Source from the content-addressed store, hash-verified

109}
110
111func TestExternalAuthProviderId(t *testing.T) {
112 t.Parallel()
113
114 app, _ := tests.NewTestApp()
115 defer app.Cleanup()
116
117 ea := core.NewExternalAuth(app)
118
119 testValues := []string{"test_1", "test2", ""}
120 for i, testValue := range testValues {
121 t.Run(fmt.Sprintf("%d_%q", i, testValue), func(t *testing.T) {
122 ea.SetProviderId(testValue)
123
124 if v := ea.ProviderId(); v != testValue {
125 t.Fatalf("Expected getter %q, got %q", testValue, v)
126 }
127
128 if v := ea.GetString("providerId"); v != testValue {
129 t.Fatalf("Expected field value %q, got %q", testValue, v)
130 }
131 })
132 }
133}
134
135func TestExternalAuthCreated(t *testing.T) {
136 t.Parallel()

Callers

nothing calls this directly

Calls 7

CleanupMethod · 0.95
SetProviderIdMethod · 0.95
ProviderIdMethod · 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…