mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
FEATURE: post chunk size should not be configurable
If people need to configure post chunk size use a plugin Core only supports out of the box settings, if changed can lead to severe performance issues.
This commit is contained in:
@ -656,19 +656,16 @@ describe TopicsController do
|
||||
context 'filters' do
|
||||
|
||||
it 'grabs first page when no filter is provided' do
|
||||
SiteSetting.stubs(:posts_chunksize).returns(20)
|
||||
TopicView.any_instance.expects(:filter_posts_in_range).with(0, 19)
|
||||
xhr :get, :show, topic_id: topic.id, slug: topic.slug
|
||||
end
|
||||
|
||||
it 'grabs first page when first page is provided' do
|
||||
SiteSetting.stubs(:posts_chunksize).returns(20)
|
||||
TopicView.any_instance.expects(:filter_posts_in_range).with(0, 19)
|
||||
xhr :get, :show, topic_id: topic.id, slug: topic.slug, page: 1
|
||||
end
|
||||
|
||||
it 'grabs correct range when a page number is provided' do
|
||||
SiteSetting.stubs(:posts_chunksize).returns(20)
|
||||
TopicView.any_instance.expects(:filter_posts_in_range).with(20, 39)
|
||||
xhr :get, :show, topic_id: topic.id, slug: topic.slug, page: 2
|
||||
end
|
||||
|
Reference in New Issue
Block a user