You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
542 B

  1. keypair = OpenSSL::PKey::RSA.new(2048)
  2. public_key = keypair.public_key.to_pem
  3. private_key = keypair.to_pem
  4. Fabricator(:account) do
  5. transient :suspended, :silenced
  6. username { sequence(:username) { |i| "#{Faker::Internet.user_name(separators: %w(_))}#{i}" } }
  7. last_webfingered_at { Time.now.utc }
  8. public_key { public_key }
  9. private_key { private_key }
  10. suspended_at { |attrs| attrs[:suspended] ? Time.now.utc : nil }
  11. silenced_at { |attrs| attrs[:silenced] ? Time.now.utc : nil }
  12. end