1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 13:52:19 +00: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
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02

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)