rename topic_status_update to topic_timer

This commit is contained in:
Neil Lalonde
2017-05-11 18:23:18 -04:00
parent 92d63b59a7
commit 55b61e9bea
39 changed files with 297 additions and 287 deletions

View File

@@ -17,7 +17,7 @@ describe TopicStatusUpdater do
title: "hello world title",
)
# TODO needed so counts sync up, PostCreator really should not give back out-of-date Topic
post.topic.set_or_create_status_update(TopicStatusUpdate.types[:close], '10')
post.topic.set_or_create_timer(TopicTimer.types[:close], '10')
post.topic.reload
TopicStatusUpdater.new(post.topic, admin).update!("autoclosed", true)
@@ -30,7 +30,7 @@ describe TopicStatusUpdater do
it "adds an autoclosed message" do
topic = create_topic
topic.set_or_create_status_update(TopicStatusUpdate.types[:close], '10')
topic.set_or_create_timer(TopicTimer.types[:close], '10')
TopicStatusUpdater.new(topic, admin).update!("autoclosed", true)
@@ -44,8 +44,8 @@ describe TopicStatusUpdater do
topic = create_topic
Fabricate(:post, topic: topic)
topic.set_or_create_status_update(
TopicStatusUpdate.types[:close], '10', based_on_last_post: true
topic.set_or_create_timer(
TopicTimer.types[:close], '10', based_on_last_post: true
)
TopicStatusUpdater.new(topic, admin).update!("autoclosed", true)