mirror of https://github.com/golang-jwt/jwt.git
chore: remove unnecessary conversions from tests (#370)
This commit is contained in:
parent
9980931f80
commit
4d0edcd99c
|
@ -28,7 +28,7 @@ func TestNumericDate(t *testing.T) {
|
||||||
b, _ := json.Marshal(s)
|
b, _ := json.Marshal(s)
|
||||||
|
|
||||||
if raw != string(b) {
|
if raw != string(b) {
|
||||||
t.Errorf("Serialized format of numeric date mismatch. Expecting: %s Got: %s", string(raw), string(b))
|
t.Errorf("Serialized format of numeric date mismatch. Expecting: %s Got: %s", raw, string(b))
|
||||||
}
|
}
|
||||||
|
|
||||||
jwt.TimePrecision = oldPrecision
|
jwt.TimePrecision = oldPrecision
|
||||||
|
@ -46,7 +46,7 @@ func TestSingleArrayMarshal(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expected != string(b) {
|
if expected != string(b) {
|
||||||
t.Errorf("Serialized format of string array mismatch. Expecting: %s Got: %s", string(expected), string(b))
|
t.Errorf("Serialized format of string array mismatch. Expecting: %s Got: %s", expected, string(b))
|
||||||
}
|
}
|
||||||
|
|
||||||
jwt.MarshalSingleStringAsArray = true
|
jwt.MarshalSingleStringAsArray = true
|
||||||
|
@ -60,7 +60,7 @@ func TestSingleArrayMarshal(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if expected != string(b) {
|
if expected != string(b) {
|
||||||
t.Errorf("Serialized format of string array mismatch. Expecting: %s Got: %s", string(expected), string(b))
|
t.Errorf("Serialized format of string array mismatch. Expecting: %s Got: %s", expected, string(b))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue