broadcast_messages.rb 315 Bytes
Newer Older
1 2 3
FactoryGirl.define do
  factory :broadcast_message do
    message "MyText"
Douwe Maan's avatar
Douwe Maan committed
4
    starts_at Date.yesterday
5 6 7 8 9 10
    ends_at Date.tomorrow

    trait :expired do
      starts_at 5.days.ago
      ends_at 3.days.ago
    end
11 12 13 14 15

    trait :future do
      starts_at 5.days.from_now
      ends_at 6.days.from_now
    end
16 17
  end
end