mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:31:18 +08:00
FEATURE: Can click to expand hidden posts to see the good stuff!
This commit is contained in:
@ -57,6 +57,21 @@ describe PostsController do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'cooked' do
|
||||
before do
|
||||
post = Post.new(cooked: 'wat')
|
||||
PostsController.any_instance.expects(:find_post_from_params).returns(post)
|
||||
end
|
||||
|
||||
it 'returns the cooked conent' do
|
||||
xhr :get, :cooked, id: 1234
|
||||
response.should be_success
|
||||
json = ::JSON.parse(response.body)
|
||||
json.should be_present
|
||||
json['cooked'].should == 'wat'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'show' do
|
||||
include_examples 'finding and showing post' do
|
||||
let(:action) { :show }
|
||||
|
Reference in New Issue
Block a user