Remove QueryJson statements method to avoid potential misuse.

This commit is contained in:
go-jet 2025-03-09 17:46:34 +01:00
parent 12c96116d0
commit 950b33191e
13 changed files with 125 additions and 143 deletions

View file

@ -272,16 +272,6 @@ func AssertQueryPanicErr(t *testing.T, stmt jet.Statement, db qrm.DB, dest inter
_ = stmt.Query(db, dest)
}
// AssertQueryJsonPanicErr check if statement QueryJSON execution panics with error errString
func AssertQueryJsonPanicErr(t *testing.T, stmt jet.Statement, db qrm.DB, dest interface{}, errString string) {
defer func() {
r := recover()
require.Equal(t, r, errString)
}()
_ = stmt.QueryJSON(context.Background(), db, dest)
}
// AssertFileContent check if file content at filePath contains expectedContent text.
func AssertFileContent(t *testing.T, filePath string, expectedContent string) {
enumFileData, err := os.ReadFile(filePath) // #nosec G304