MCPcopy
hub / github.com/pocketbase/pocketbase / TestRecordEmail

Function TestRecordEmail

core/record_model_auth_test.go:12–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestRecordEmail(t *testing.T) {
13 record := core.NewRecord(core.NewAuthCollection("test"))
14
15 if record.Email() != "" {
16 t.Fatalf("Expected email %q, got %q", "", record.Email())
17 }
18
19 email := "test@example.com"
20 record.SetEmail(email)
21
22 if record.Email() != email {
23 t.Fatalf("Expected email %q, got %q", email, record.Email())
24 }
25}
26
27func TestRecordEmailVisibility(t *testing.T) {
28 record := core.NewRecord(core.NewAuthCollection("test"))

Callers

nothing calls this directly

Calls 4

EmailMethod · 0.95
SetEmailMethod · 0.95
NewRecordFunction · 0.92
NewAuthCollectionFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…