1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-27 05:28:44 +02:00

Test bad username in basic auth backend

This commit is contained in:
Alexandre Iooss
2020-10-09 23:19:53 +02:00
parent 431bc2e7de
commit 0fd1611836

View File

@ -15,7 +15,13 @@ func TestBasicLogin(t *testing.T) {
t.Error("Error while logging with the basic authentication:", err)
}
// Test bad credentials
// Test bad username
ok, err = backend.Login("baduser", "demo")
if ok {
t.Error("Authentification failed to fail:", err)
}
// Test bad password
ok, err = backend.Login("demo", "badpass")
if ok {
t.Error("Authentification failed to fail:", err)