mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 01:21:18 +02:00
Enable testifylint rules (#34075)
Some checks failed
Some checks failed
enable testifylint rules disabled in: https://github.com/go-gitea/gitea/pull/34054
This commit is contained in:
@@ -51,11 +51,11 @@ func TestOptionalToJson(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
b, err := json.Marshal(tc.obj)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, tc.want, string(b), "gitea json module returned unexpected")
|
||||
assert.Equal(t, tc.want, string(b), "gitea json module returned unexpected")
|
||||
|
||||
b, err = std_json.Marshal(tc.obj)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, tc.want, string(b), "std json module returned unexpected")
|
||||
assert.Equal(t, tc.want, string(b), "std json module returned unexpected")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -89,12 +89,12 @@ func TestOptionalFromJson(t *testing.T) {
|
||||
var obj1 testSerializationStruct
|
||||
err := json.Unmarshal([]byte(tc.data), &obj1)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, tc.want, obj1, "gitea json module returned unexpected")
|
||||
assert.Equal(t, tc.want, obj1, "gitea json module returned unexpected")
|
||||
|
||||
var obj2 testSerializationStruct
|
||||
err = std_json.Unmarshal([]byte(tc.data), &obj2)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, tc.want, obj2, "std json module returned unexpected")
|
||||
assert.Equal(t, tc.want, obj2, "std json module returned unexpected")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -135,7 +135,7 @@ optional_two_string: null
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
b, err := yaml.Marshal(tc.obj)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, tc.want, string(b), "yaml module returned unexpected")
|
||||
assert.Equal(t, tc.want, string(b), "yaml module returned unexpected")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,7 @@ optional_twostring: null
|
||||
var obj testSerializationStruct
|
||||
err := yaml.Unmarshal([]byte(tc.data), &obj)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, tc.want, obj, "yaml module returned unexpected")
|
||||
assert.Equal(t, tc.want, obj, "yaml module returned unexpected")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user