BUGFIX: could not see the revisions of a post in a deleted topic

This commit is contained in:
Régis Hanol
2014-05-12 16:30:10 +02:00
parent 312bc6bff9
commit fca6738212
5 changed files with 34 additions and 20 deletions

View File

@ -508,6 +508,20 @@ describe PostsController do
end
end
context "deleted topic" do
let(:admin) { log_in(:admin) }
let(:deleted_topic) { Fabricate(:topic, user: admin) }
let(:post) { Fabricate(:post, user: admin, topic: deleted_topic) }
let(:post_revision) { Fabricate(:post_revision, user: admin, post: post) }
before { deleted_topic.trash!(admin) }
it "also work on deleted topic" do
xhr :get, :revisions, post_id: post_revision.post_id, revision: post_revision.number
response.should be_success
end
end
end
describe 'expandable embedded posts' do