1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
package webauthn
import (
"reflect"
"testing"
"github.com/go-webauthn/webauthn/protocol"
)
func TestMakeNewCredential(t *testing.T) {
type args struct {
c *protocol.ParsedCredentialCreationData
}
var tests []struct {
name string
args args
want *Credential
wantErr bool
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := MakeNewCredential(tt.args.c)
if (err != nil) != tt.wantErr {
t.Errorf("MakeNewCredential() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("MakeNewCredential() = %v, want %v", got, tt.want)
}
})
}
}
|