FEATURE: make pin expiration mandatory

This commit is contained in:
Régis Hanol
2015-07-29 16:34:21 +02:00
parent 9e2632badd
commit faf4f44776
18 changed files with 192 additions and 97 deletions

View File

@ -324,12 +324,12 @@ describe TopicsController do
end
it 'calls update_status on the forum topic with false' do
Topic.any_instance.expects(:update_status).with('closed', false, @user)
Topic.any_instance.expects(:update_status).with('closed', false, @user, until: nil)
xhr :put, :status, topic_id: @topic.id, status: 'closed', enabled: 'false'
end
it 'calls update_status on the forum topic with true' do
Topic.any_instance.expects(:update_status).with('closed', true, @user)
Topic.any_instance.expects(:update_status).with('closed', true, @user, until: nil)
xhr :put, :status, topic_id: @topic.id, status: 'closed', enabled: 'true'
end