FIX: Can't update status_type of topic timers.

https://meta.discourse.org/t/topic-timers-internal-error-500/64805
This commit is contained in:
Guo Xiang Tan
2017-06-21 15:31:15 +09:00
parent dd85c1098b
commit 4c98bd9d5f
3 changed files with 15 additions and 3 deletions

View File

@ -260,7 +260,8 @@ RSpec.describe TopicTimer, type: :model do
open_topic_timer = Fabricate(:topic_timer,
status_type: described_class.types[:open],
execute_at: Time.zone.now - 1.hour,
created_at: Time.zone.now - 2.hour
created_at: Time.zone.now - 2.hour,
topic: Fabricate(:topic, closed: true)
)
Fabricate(:topic_timer)