Show the entire history of replies above a post when you expend "in reply to"

This commit is contained in:
Robin Ward
2013-08-06 17:42:36 -04:00
parent c74da0d262
commit 1c3804934e
19 changed files with 158 additions and 130 deletions

View File

@ -13,7 +13,6 @@ describe PostsController do
end
describe 'show' do
let(:user) { log_in }
let(:post) { Fabricate(:post, user: user) }
@ -52,9 +51,26 @@ describe PostsController do
end
end
end
describe 'reply_history' do
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)
xhr :get, :reply_history, id: post.id
response.should be_forbidden
end
it 'suceeds' do
Post.any_instance.expects(:reply_history)
xhr :get, :reply_history, id: post.id
response.should be_success
end
end
describe 'versions' do
shared_examples 'posts_controller versions examples' do