Add post_edit_time_limit site setting to limit the how long a post can be edited and deleted by the author. Default is 1 year.

This commit is contained in:
Neil Lalonde
2014-01-07 10:32:09 -05:00
parent e750ea010f
commit 259295d865
10 changed files with 118 additions and 5 deletions

View File

@ -214,7 +214,7 @@ describe PostsController do
end
it "raises an error when the user doesn't have permission to see the post" do
Guardian.any_instance.expects(:can_edit?).with(post).returns(false)
Guardian.any_instance.expects(:can_edit?).with(post).at_least_once.returns(false)
xhr :put, :update, update_params
response.should be_forbidden
end