fix: use user10 instead of user1 for TOTP fixture to avoid breaking login tests
This commit is contained in:
parent
cdf5d30a42
commit
659e73af05
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue