FIX: staff members should be able to see raw email of deleted posts

This commit is contained in:
Régis Hanol
2016-08-01 23:55:22 +02:00
parent 7d0dc7cb7a
commit 681f566a66
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ describe PostsController do
describe "when logged in" do
let(:user) { log_in }
let(:post) { Fabricate(:post, user: user, raw_email: 'email_content') }
let(:post) { Fabricate(:post, deleted_at: 2.hours.ago, user: user, raw_email: 'email_content') }
it "raises an error if the user doesn't have permission to view raw email" do
Guardian.any_instance.expects(:can_view_raw_email?).returns(false)