Commit c7302216 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-broadcast-message-factory-date-range' into 'master'

TST: Use more accurate time windows so tests do not fail

This MR sets the Datetime attributes of the of the broadcast messages factory more precisely. 

This MR is necessary to ensure that all specs which use the broadcast message factory will pass when run anywhere at any time. Currently, the way the 'starts_at' and 'ends_at' attributes are set,if the specs are run at one second to midnight, the broadcast message will expire in one second. I have changed it so that we are guaranteed a period of one day until expiration. I believe this is the desired behaviour and it's also consistent with the rest of the factory. 

See merge request !5674
parents 04ae276a a92281ce
FactoryGirl.define do FactoryGirl.define do
factory :broadcast_message do factory :broadcast_message do
message "MyText" message "MyText"
starts_at Date.yesterday starts_at 1.day.ago
ends_at Date.tomorrow ends_at 1.day.from_now
trait :expired do trait :expired do
starts_at 5.days.ago starts_at 5.days.ago
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment