MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestRequireValidSQL_Valid

Function TestRequireValidSQL_Valid

pkg/gosqlx/testing/testing_test.go:88–96  ·  view source on GitHub ↗

Test RequireValidSQL with valid SQL

(t *testing.T)

Source from the content-addressed store, hash-verified

86
87// Test RequireValidSQL with valid SQL
88func TestRequireValidSQL_Valid(t *testing.T) {
89 mockT := &mockTestingT{}
90
91 RequireValidSQL(mockT, "SELECT * FROM users")
92
93 if mockT.fataled {
94 t.Error("RequireValidSQL should not fatal for valid SQL")
95 }
96}
97
98// Test RequireValidSQL with invalid SQL
99func TestRequireValidSQL_Invalid(t *testing.T) {

Callers

nothing calls this directly

Calls 2

RequireValidSQLFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected