Commit a92281ce authored by joshbabier's avatar joshbabier

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

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.

This corrects the following three specs that can fail depending upon
where and when they are run:

parent b5eb94ea
FactoryGirl.define do
factory :broadcast_message do
message "MyText"
starts_at Date.yesterday
ends_at Date.tomorrow
trait :expired do
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