mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-21 17:07:47 +02:00
fix: preserve battery array encoding with json v2
This commit is contained in:
@@ -620,7 +620,7 @@ func TestAverageSystemStatsSlice_ZeroRepresentativeBattery(t *testing.T) {
|
||||
{Battery: [2]uint8{0, 1}, Batteries: map[string]uint8{"Primary": 0}},
|
||||
{},
|
||||
})
|
||||
assert.Equal(t, [2]uint8{0, 1}, result.Battery)
|
||||
assert.Equal(t, system.Battery{0, 1}, result.Battery)
|
||||
assert.Equal(t, map[string]uint8{"Primary": 0}, result.Batteries)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user