remove acts_as_paranoid, use .trash! , .recover! and .with_deleted as needed
makes upgrading to rails 4 possible
This commit is contained in:
parent
a71a15913c
commit
e9fc272db7
21 changed files with 77 additions and 36 deletions
spec/controllers
|
@ -30,7 +30,7 @@ describe PostsController do
|
|||
context "deleted post" do
|
||||
|
||||
before do
|
||||
post.destroy
|
||||
post.trash!
|
||||
end
|
||||
|
||||
it "can't find deleted posts as an anonymous user" do
|
||||
|
@ -121,7 +121,7 @@ describe PostsController do
|
|||
end
|
||||
|
||||
it "calls recover" do
|
||||
Post.any_instance.expects(:recover)
|
||||
Post.any_instance.expects(:recover!)
|
||||
xhr :put, :recover, post_id: post.id
|
||||
end
|
||||
|
||||
|
|
Reference in a new issue