Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-01-01 00:04:07 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-01-13 19:34:58 +0300
commit8086b2bd2ecb0ff647da766c436eda47b7434599 (patch)
tree09d202981c18f3977b36c6af280d688b7a3aaadb /spec/factories/broadcast_messages.rb
parent12903762d15cef256f579b1ddb692a0254cace52 (diff)
Simplify BroadcastMessage factory
Also make the feature tests less brittle.
Diffstat (limited to 'spec/factories/broadcast_messages.rb')
-rw-r--r--spec/factories/broadcast_messages.rb13
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