fix: do not modify userInfo when marshaling

This commit is contained in:
David Sharnoff 2023-03-27 13:40:10 -07:00 committed by Tim Möhlmann
parent be3cc13c27
commit e1d50faf9b
6 changed files with 23 additions and 11 deletions

View file

@ -52,11 +52,14 @@ func TestUserInfoMarshal(t *testing.T) {
out := new(UserInfo)
assert.NoError(t, json.Unmarshal(marshal, out))
assert.Equal(t, userinfo, out)
expected, err := json.Marshal(out)
assert.NoError(t, err)
assert.Equal(t, expected, marshal)
out2 := new(UserInfo)
assert.NoError(t, json.Unmarshal(expected, out2))
assert.Equal(t, out, out2)
}
func TestUserInfoEmailVerifiedUnmarshal(t *testing.T) {