mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-04 10:47:35 +00:00
fix: make auth source group sync correctly handle team removal (#37161)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -35,4 +35,14 @@ func TestSet(t *testing.T) {
|
||||
assert.False(t, s.Contains("key1"))
|
||||
assert.True(t, s.Contains("key6"))
|
||||
assert.True(t, s.Contains("key7"))
|
||||
|
||||
s = SetOf("a", "b", "c")
|
||||
n := s.RemoveFromSet(SetOf("b", "c", "d"))
|
||||
assert.Equal(t, 2, n)
|
||||
assert.ElementsMatch(t, []string{"a"}, s.Values())
|
||||
|
||||
s = SetOf("a", "b", "c")
|
||||
n = s.RemoveFromSlice([]string{"b", "c", "d"})
|
||||
assert.Equal(t, 2, n)
|
||||
assert.ElementsMatch(t, []string{"a"}, s.Values())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user