httpexpect
httpexpect copied to clipboard
Allow WithPath to work for floating point numbers
#449 details the problem. The fix was to handle the cases of float32 and float64 separately, and use strconv.FormatFloat instead of fmt.Sprint in those cases.
I've also added a couple of test cases to verify it works and doesn't break this for other types.
coverage: 94.815% (+0.002%) from 94.813% when pulling db112b38754187fa7ed0dcd7dfee647f102e79ad on alvii147:alvii147/449/WithPath-floating-point into 07a4dbe680a31629b43830c7126669d4be2332e2 on gavv:master.
Makes sense. Thanks!