Add deleted_by
to Trashable
tables
This commit is contained in:
parent
4c0fe3bc12
commit
b7327942af
18 changed files with 62 additions and 38 deletions
spec/controllers
|
@ -14,7 +14,8 @@ describe PostsController do
|
|||
|
||||
describe 'show' do
|
||||
|
||||
let(:post) { Fabricate(:post, user: log_in) }
|
||||
let(:user) { log_in }
|
||||
let(:post) { Fabricate(:post, user: user) }
|
||||
|
||||
it 'ensures the user can see the post' do
|
||||
Guardian.any_instance.expects(:can_see?).with(post).returns(false)
|
||||
|
@ -30,7 +31,7 @@ describe PostsController do
|
|||
context "deleted post" do
|
||||
|
||||
before do
|
||||
post.trash!
|
||||
post.trash!(user)
|
||||
end
|
||||
|
||||
it "can't find deleted posts as an anonymous user" do
|
||||
|
|
Reference in a new issue