1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 20:17:21 +00:00

Fixed assert statements. (#16089)

This commit is contained in:
KN4CK3R
2021-06-07 07:27:09 +02:00
committed by GitHub
parent 51775f65bc
commit 3607f79d78
56 changed files with 227 additions and 228 deletions

View File

@ -223,9 +223,9 @@ func TestInt64sToMap(t *testing.T) {
func TestInt64sContains(t *testing.T) {
assert.Equal(t, map[int64]bool{}, Int64sToMap([]int64{}))
assert.Equal(t, true, Int64sContains([]int64{6, 44324, 4324, 32, 1, 2323}, 1))
assert.Equal(t, true, Int64sContains([]int64{2323}, 2323))
assert.Equal(t, false, Int64sContains([]int64{6, 44324, 4324, 32, 1, 2323}, 232))
assert.True(t, Int64sContains([]int64{6, 44324, 4324, 32, 1, 2323}, 1))
assert.True(t, Int64sContains([]int64{2323}, 2323))
assert.False(t, Int64sContains([]int64{6, 44324, 4324, 32, 1, 2323}, 232))
}
func TestIsLetter(t *testing.T) {
@ -249,7 +249,7 @@ func TestIsLetter(t *testing.T) {
func TestSetupGiteaRoot(t *testing.T) {
_ = os.Setenv("GITEA_ROOT", "test")
assert.EqualValues(t, "test", SetupGiteaRoot())
assert.Equal(t, "test", SetupGiteaRoot())
_ = os.Setenv("GITEA_ROOT", "")
assert.NotEqual(t, "test", SetupGiteaRoot())
}