auto replace rules in titles

This commit is contained in:
Régis Hanol
2013-04-10 11:00:50 +02:00
parent 33e3ad1603
commit c5cf8be864
14 changed files with 280 additions and 91 deletions

View File

@ -407,12 +407,13 @@ describe TopicsController do
it 'succeeds' do
xhr :put, :update, topic_id: @topic.id, slug: @topic.title
response.should be_success
::JSON.parse(response.body)['basic_topic'].should be_present
end
it 'allows a change of title' do
xhr :put, :update, topic_id: @topic.id, slug: @topic.title, title: 'this is a new title for the topic'
xhr :put, :update, topic_id: @topic.id, slug: @topic.title, title: 'This is a new title for the topic'
@topic.reload
@topic.title.should == 'this is a new title for the topic'
@topic.title.should == 'This is a new title for the topic'
end
it 'triggers a change of category' do