Files
common/webauthn/func_test.go

20 lines
386 B
Go
Raw Permalink Normal View History

2025-10-10 10:17:22 -04:00
package webauthn
import (
"errors"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func AssertIsProtocolError(t *testing.T, err error, errType, errDetails, errInfo string) {
var e *Error
require.True(t, errors.As(err, &e))
assert.Equal(t, errType, e.Type)
assert.Equal(t, errDetails, e.Details)
assert.Equal(t, errInfo, e.DevInfo)
}