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

Function TestAssertValidSQL_Valid

pkg/gosqlx/testing/testing_test.go:26–37  ·  view source on GitHub ↗

Test AssertValidSQL with valid SQL

(t *testing.T)

Source from the content-addressed store, hash-verified

24
25// Test AssertValidSQL with valid SQL
26func TestAssertValidSQL_Valid(t *testing.T) {
27 mockT := &mockTestingT{}
28
29 result := AssertValidSQL(mockT, "SELECT * FROM users")
30
31 if !result {
32 t.Error("AssertValidSQL should return true for valid SQL")
33 }
34 if mockT.failed {
35 t.Error("AssertValidSQL should not fail for valid SQL")
36 }
37}
38
39// Test AssertValidSQL with invalid SQL
40func TestAssertValidSQL_Invalid(t *testing.T) {

Callers

nothing calls this directly

Calls 2

AssertValidSQLFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected