(t *testing.T)
| 24 | } |
| 25 | |
| 26 | func TestCombineAuthenticators(t *testing.T) { |
| 27 | a1 := auth.AuthenticateSingleUser("user1", "password1") |
| 28 | a2 := auth.AuthenticateSingleUser("user2", "password2") |
| 29 | a3 := auth.AuthenticateSingleUser("user3", "password3") |
| 30 | |
| 31 | a := auth.CombineAuthenticators(a1, a2, a3) |
| 32 | verifyAuthenticator(t, a, "user1", "password1", true) |
| 33 | verifyAuthenticator(t, a, "user2", "password2", true) |
| 34 | verifyAuthenticator(t, a, "user3", "password3", true) |
| 35 | verifyAuthenticator(t, a, "user1", "password2", false) |
| 36 | } |
| 37 | |
| 38 | func verifyAuthenticator(t *testing.T, a auth.Authenticator, username, password string, want bool) { |
| 39 | t.Helper() |
nothing calls this directly
no test coverage detected