fix: use user10 instead of user1 for TOTP fixture to avoid breaking login tests

This commit is contained in:
kolaente 2026-03-20 10:21:52 +01:00 committed by kolaente
parent cdf5d30a42
commit 659e73af05
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
- id: 1
user_id: 1
user_id: 10
secret: 'JBSWY3DPEHPK3PXP'
enabled: true
url: 'otpauth://totp/Vikunja:user1?secret=JBSWY3DPEHPK3PXP&issuer=Vikunja'
url: 'otpauth://totp/Vikunja:user10?secret=JBSWY3DPEHPK3PXP&issuer=Vikunja'

View File

@ -740,9 +740,9 @@ func TestCaldavTOTPBlocksBasicAuth(t *testing.T) {
e, _ := setupTestEnv()
c, _ := createRequest(e, http.MethodGet, "", nil, nil)
// testuser1 has TOTP enabled via fixtures.
// testuser10 has TOTP enabled via fixtures.
// "12345678" is the plaintext password for all test users.
result, err := caldav.BasicAuth(c, testuser1.Username, "12345678")
result, err := caldav.BasicAuth(c, testuser10.Username, "12345678")
require.NoError(t, err)
assert.False(t, result, "BasicAuth should reject password login when user has TOTP enabled")
})