Improve handling of <nil> Params

Fixes #8825
This commit is contained in:
Bjørn Erik Pedersen
2021-07-30 10:56:45 +02:00
parent 268065cb2d
commit e3dc5240f0
6 changed files with 74 additions and 11 deletions

View File

@@ -114,6 +114,16 @@ func TestToSliceStringMap(t *testing.T) {
}
}
func TestToParamsAndPrepare(t *testing.T) {
c := qt.New(t)
_, ok := ToParamsAndPrepare(map[string]interface{}{"A": "av"})
c.Assert(ok, qt.IsTrue)
params, ok := ToParamsAndPrepare(nil)
c.Assert(ok, qt.IsTrue)
c.Assert(params, qt.DeepEquals, Params{})
}
func TestRenameKeys(t *testing.T) {
c := qt.New(t)