mirror of
https://github.com/go-gitea/gitea
synced 2024-11-16 15:14:24 +00:00
add testcase for fix
This commit is contained in:
parent
1a378f47d7
commit
0c655c4ff0
@ -58,6 +58,12 @@ func TestBuildCanSeeUserCondition(t *testing.T) {
|
|||||||
assert.Len(t, ids, 28)
|
assert.Len(t, ids, 28)
|
||||||
assert.EqualValues(t, []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 27, 28, 29, 30, 31, 32, 33, 34, 36}, ids)
|
assert.EqualValues(t, []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 27, 28, 29, 30, 31, 32, 33, 34, 36}, ids)
|
||||||
|
|
||||||
|
// limited user who is followed by private user
|
||||||
|
cond = user.BuildCanSeeUserCondition(getUser(t, 33))
|
||||||
|
ids = getIDs(cond)
|
||||||
|
assert.Len(t, ids, 28)
|
||||||
|
assert.EqualValues(t, []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 27, 28, 29, 30, 31, 32, 33, 34, 36}, ids)
|
||||||
|
|
||||||
// restricted user
|
// restricted user
|
||||||
cond = user.BuildCanSeeUserCondition(getUser(t, 29))
|
cond = user.BuildCanSeeUserCondition(getUser(t, 29))
|
||||||
ids = getIDs(cond)
|
ids = getIDs(cond)
|
||||||
|
Loading…
Reference in New Issue
Block a user