diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-12-31 16:04:07 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-13 11:34:58 -0500 |
commit | 8086b2bd2ecb0ff647da766c436eda47b7434599 (patch) | |
tree | 09d202981c18f3977b36c6af280d688b7a3aaadb /spec | |
parent | 12903762d15cef256f579b1ddb692a0254cace52 (diff) | |
download | gitlab-ce-8086b2bd2ecb0ff647da766c436eda47b7434599.tar.gz |
Simplify BroadcastMessage factory
Also make the feature tests less brittle.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/broadcast_messages.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/factories/broadcast_messages.rb b/spec/factories/broadcast_messages.rb index ea0039d39e6..0c7bc573612 100644 --- a/spec/factories/broadcast_messages.rb +++ b/spec/factories/broadcast_messages.rb @@ -6,7 +6,6 @@ # message :text not null # starts_at :datetime # ends_at :datetime -# alert_type :integer # created_at :datetime # updated_at :datetime # color :string(255) @@ -18,10 +17,12 @@ FactoryGirl.define do factory :broadcast_message do message "MyText" - starts_at "2013-11-12 13:43:25" - ends_at "2013-11-12 13:43:25" - alert_type 1 - color "#555555" - font "#BBBBBB" + starts_at Date.today + ends_at Date.tomorrow + + trait :expired do + starts_at 5.days.ago + ends_at 3.days.ago + end end end |