FIX: Missing post revision when editing the first post.
This commit is contained in:
parent
e2444e0d31
commit
834c86678f
|
@ -330,6 +330,7 @@ class TopicsController < ApplicationController
|
|||
|
||||
changes.delete(:title) if topic.title == changes[:title]
|
||||
changes.delete(:category_id) if topic.category_id.to_i == changes[:category_id].to_i
|
||||
changes.delete(:tags_empty_array) if !topic.tags.exists?
|
||||
|
||||
success = true
|
||||
|
||||
|
|
|
@ -1002,7 +1002,8 @@ RSpec.describe TopicsController do
|
|||
it "doesn't call the PostRevisor when there is no changes" do
|
||||
expect do
|
||||
put "/t/#{topic.slug}/#{topic.id}.json", params: {
|
||||
category_id: topic.category_id
|
||||
category_id: topic.category_id,
|
||||
tags_empty_array: true
|
||||
}
|
||||
end.not_to change(PostRevision.all, :count)
|
||||
|
||||
|
|
Loading…
Reference in New Issue