mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 18:41:07 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user