MCPcopy
hub / github.com/go-gorm/gorm / TestGenericsUpdates

Function TestGenericsUpdates

tests/generics_test.go:1031–1039  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1029}
1030
1031func TestGenericsUpdates(t *testing.T) {
1032 ctx := context.Background()
1033
1034 // Just test that the API can be called
1035 _, err := gorm.G[User](DB).Where("id = ?", 1).Updates(ctx, User{Name: "test"})
1036 if err != nil {
1037 t.Fatalf("Updates failed: %v", err)
1038 }
1039}
1040
1041func TestGenericsDeleteAPI(t *testing.T) {
1042 ctx := context.Background()

Callers

nothing calls this directly

Calls 2

UpdatesMethod · 0.65
WhereMethod · 0.65

Tested by

no test coverage detected