Skip to content
Snippets Groups Projects
Unverified Commit 2d1ccb3d authored by Matt Jankowski's avatar Matt Jankowski Committed by GitHub
Browse files

Restore missing fabricators (#23951)

parent 506b16cf
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
Fabricator(:account_warning_preset) do
text { Faker::Lorem.paragraph }
end
# frozen_string_literal: true
Fabricator(:list_account) do
list
account
before_create { |list_account, _| list_account.list.account.follow!(account) }
end
# frozen_string_literal: true
Fabricator(:one_time_key) do
device
key_id { Faker::Alphanumeric.alphanumeric(number: 10) }
key { Base64.strict_encode64(Ed25519::SigningKey.generate.verify_key.to_bytes) }
signature do |attrs|
signing_key = Ed25519::SigningKey.generate
attrs[:device].update(fingerprint_key: Base64.strict_encode64(signing_key.verify_key.to_bytes))
Base64.strict_encode64(signing_key.sign(attrs[:key]))
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment