fix: do not modify userInfo when marshaling
This commit is contained in:
parent
be3cc13c27
commit
e1d50faf9b
6 changed files with 23 additions and 11 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue