discourse/spec/fabricators/screened_email_fabricator.rb
Andrei Prigorshnev f4e424d7d4
DEV: find_each in CSV exports (#22573)
So we have to order by calling `find_each(order: :desc)`.
Note that that will order rows by Id, not by `last_match_at`
as we tried before (though that didn't work).
2023-08-17 12:33:52 +10:00

11 lines
427 B
Ruby

# frozen_string_literal: true
Fabricator(:screened_email) do
email { sequence(:email) { |n| "bad#{n}@spammers.org" } }
action_type ScreenedEmail.actions[:block]
match_count { sequence(:match_count) { |n| n } }
last_match_at { sequence(:last_match_at) { |n| Time.now + n.days } }
created_at { sequence(:created_at) { |n| Time.now + n.days } }
ip_address { sequence(:ip_address) { |i| "99.232.23.#{i % 254}" } }
end