diff options
Diffstat (limited to 'spec/fabricators')
-rw-r--r-- | spec/fabricators/webauthn_credential_fabricator.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/fabricators/webauthn_credential_fabricator.rb b/spec/fabricators/webauthn_credential_fabricator.rb new file mode 100644 index 000000000..496a7a735 --- /dev/null +++ b/spec/fabricators/webauthn_credential_fabricator.rb @@ -0,0 +1,7 @@ +Fabricator(:webauthn_credential) do + user_id { Fabricate(:user).id } + external_id { Base64.urlsafe_encode64(SecureRandom.random_bytes(16)) } + public_key { OpenSSL::PKey::EC.new("prime256v1").generate_key.public_key } + nickname 'USB key' + sign_count 0 +end |