summaryrefslogtreecommitdiff
path: root/spec/factories/broadcast_messages.rb
blob: 978a7d4cecb978fe1a53b44d16cf51aa6c0f8fb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# == Schema Information
#
# Table name: broadcast_messages
#
#  id         :integer          not null, primary key
#  message    :text             not null
#  starts_at  :datetime
#  ends_at    :datetime
#  created_at :datetime
#  updated_at :datetime
#  color      :string(255)
#  font       :string(255)
#

# Read about factories at https://github.com/thoughtbot/factory_girl

FactoryGirl.define do
  factory :broadcast_message do
    message "MyText"
    starts_at Date.today
    ends_at Date.tomorrow

    trait :expired do
      starts_at 5.days.ago
      ends_at 3.days.ago
    end

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