mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -470,7 +470,7 @@ describe Topic do
|
||||
|
||||
expect(notification.user).to eq(user)
|
||||
expect(notification.topic).to eq(topic)
|
||||
|
||||
|
||||
expect(notification.notification_type)
|
||||
.to eq(Notification.types[:invited_to_private_message])
|
||||
end
|
||||
@@ -1267,6 +1267,16 @@ describe Topic do
|
||||
end
|
||||
end
|
||||
|
||||
it 'should allow status_type to be updated' do
|
||||
Timecop.freeze do
|
||||
topic_timer = closing_topic.set_or_create_timer(
|
||||
TopicTimer.types[:publish_to_category], 72, by_user: admin
|
||||
)
|
||||
|
||||
expect(topic_timer.execute_at).to eq(3.days.from_now)
|
||||
end
|
||||
end
|
||||
|
||||
it "does not update topic's topic status created_at it was already set to close" do
|
||||
expect{
|
||||
closing_topic.set_or_create_timer(TopicTimer.types[:close], 14)
|
||||
|
||||
Reference in New Issue
Block a user