MCPcopy
hub / github.com/pocketbase/pocketbase / TestAuthOriginUpdated

Function TestAuthOriginUpdated

core/auth_origin_model_test.go:132–150  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130}
131
132func TestAuthOriginUpdated(t *testing.T) {
133 t.Parallel()
134
135 app, _ := tests.NewTestApp()
136 defer app.Cleanup()
137
138 origin := core.NewAuthOrigin(app)
139
140 if v := origin.Updated().String(); v != "" {
141 t.Fatalf("Expected empty updated, got %q", v)
142 }
143
144 now := types.NowDateTime()
145 origin.SetRaw("updated", now)
146
147 if v := origin.Updated().String(); v != now.String() {
148 t.Fatalf("Expected %q updated, got %q", now.String(), v)
149 }
150}
151
152func TestAuthOriginPreValidate(t *testing.T) {
153 t.Parallel()

Callers

nothing calls this directly

Calls 7

CleanupMethod · 0.95
UpdatedMethod · 0.95
NewTestAppFunction · 0.92
NewAuthOriginFunction · 0.92
NowDateTimeFunction · 0.92
SetRawMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…