Skip to content

Commit ff5bcf4

Browse files
committed
add tests
1 parent 63255da commit ff5bcf4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

query/encode_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,28 @@ func TestValues_StructsAsJSON(t *testing.T) {
440440
"str": {`{"a":"abc","b":5,"t":{"l":true,"m":false}}`},
441441
},
442442
},
443+
{
444+
Outer{
445+
P: &Inner{
446+
A: "def",
447+
B: 22,
448+
T: Nested{
449+
L: true,
450+
M: true,
451+
},
452+
},
453+
},
454+
url.Values{
455+
"str": {`{"a":"","b":0,"t":{"l":false,"m":false}}`},
456+
"ptr": {`{"a":"def","b":22,"t":{"l":true,"m":true}}`},
457+
},
458+
},
459+
{
460+
Outer{},
461+
url.Values{
462+
"str": {`{"a":"","b":0,"t":{"l":false,"m":false}}`},
463+
},
464+
},
443465
{
444466
nil,
445467
url.Values{},

0 commit comments

Comments
 (0)