mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
20 lines
431 B
Go
20 lines
431 B
Go
|
package validator
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/authelia/authelia/internal/configuration/schema"
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestShouldSetDefaultIssuer(t *testing.T) {
|
||
|
validator := schema.NewStructValidator()
|
||
|
config := schema.TOTPConfiguration{}
|
||
|
|
||
|
ValidateTOTP(&config, validator)
|
||
|
|
||
|
require.Len(t, validator.Errors(), 0)
|
||
|
assert.Equal(t, "Authelia", config.Issuer)
|
||
|
}
|