mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
Show the entire history of replies above a post when you expend "in reply to"
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user