mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 22:21:55 +08:00
FIX: Topic status update not being deleted once it has been executed.
This commit is contained in:
parent
2be14a604c
commit
aadf4805a5
|
@ -10,6 +10,7 @@ module Jobs
|
|||
PostTimestampChanger.new(timestamp: Time.zone.now, topic: topic).change! do
|
||||
topic.change_category_to_id(topic_status_update.category_id)
|
||||
topic.update_columns(visible: true)
|
||||
topic_status_update.trash!(Discourse.system_user)
|
||||
end
|
||||
|
||||
MessageBus.publish("/topic/#{topic.id}", reload_topic: true, refresh_stream: true)
|
||||
|
|
|
@ -47,6 +47,7 @@ RSpec.describe Jobs::PublishTopicToCategory do
|
|||
topic.reload
|
||||
expect(topic.category).to eq(another_category)
|
||||
expect(topic.visible).to eq(true)
|
||||
expect(TopicStatusUpdate.find_by(id: topic.topic_status_update.id)).to eq(nil)
|
||||
|
||||
%w{created_at bumped_at updated_at last_posted_at}.each do |attribute|
|
||||
expect(topic.public_send(attribute)).to be_within(1.second).of(Time.zone.now)
|
||||
|
|
Loading…
Reference in New Issue
Block a user