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

Function TestAssertInvalidSQL_Invalid

pkg/gosqlx/testing/testing_test.go:57–68  ·  view source on GitHub ↗

Test AssertInvalidSQL with invalid SQL

(t *testing.T)

Source from the content-addressed store, hash-verified

55
56// Test AssertInvalidSQL with invalid SQL
57func TestAssertInvalidSQL_Invalid(t *testing.T) {
58 mockT := &mockTestingT{}
59
60 result := AssertInvalidSQL(mockT, "SELECT FROM WHERE")
61
62 if !result {
63 t.Error("AssertInvalidSQL should return true for invalid SQL")
64 }
65 if mockT.failed {
66 t.Error("AssertInvalidSQL should not fail for invalid SQL")
67 }
68}
69
70// Test AssertInvalidSQL with valid SQL
71func TestAssertInvalidSQL_Valid(t *testing.T) {

Callers

nothing calls this directly

Calls 2

AssertInvalidSQLFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected