mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
add test for no rows to db.query
This commit is contained in:
@@ -88,6 +88,15 @@ func TestGoodDbQuery(t *testing.T) {
|
||||
{"id": int64(2), "value": "test-2"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no rows",
|
||||
params: map[string]any{
|
||||
"module": "test",
|
||||
"query": "select * from test where id = -1;",
|
||||
},
|
||||
payload: "",
|
||||
expected: nil,
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user