(t *testing.T)
| 246 | } |
| 247 | |
| 248 | func TestCheckListsForUser(t *testing.T) { |
| 249 | t.Parallel() |
| 250 | |
| 251 | c := newTestConfig() |
| 252 | |
| 253 | // Basic checks |
| 254 | assert.False(t, c.checkListsForUser("an-admin")) |
| 255 | assert.True(t, c.checkListsForUser("an-admin", []string{"an-admin"})) |
| 256 | assert.True(t, c.checkListsForUser("an-admin", []string{"$admins"})) |
| 257 | assert.True(t, c.checkListsForUser("an-admin", []string{"$nested-admins"})) |
| 258 | |
| 259 | // Ensure loops don't crash this |
| 260 | assert.False(t, c.checkListsForUser("an-admin", []string{"$loop"})) |
| 261 | } |
| 262 | |
| 263 | type allRepoAccessLevels struct { |
| 264 | Admin AccessLevel |
nothing calls this directly
no test coverage detected