mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: don't error out when updating a topic with no changes
This commit is contained in:
@ -783,6 +783,12 @@ describe TopicsController do
|
||||
expect(response).not_to be_success
|
||||
end
|
||||
|
||||
it "doesn't call the PostRevisor when there is no changes" do
|
||||
PostRevisor.any_instance.expects(:revise!).never
|
||||
xhr :put, :update, topic_id: @topic.id, slug: @topic.title, title: @topic.title, category_id: @topic.category_id
|
||||
expect(response).to be_success
|
||||
end
|
||||
|
||||
context "allow_uncategorized_topics is false" do
|
||||
before do
|
||||
SiteSetting.stubs(:allow_uncategorized_topics).returns(false)
|
||||
|
Reference in New Issue
Block a user