mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:17:36 +08:00
FIX: Next pages were missing on <noscript>
content. Also fixed some long standing bugs.
This commit is contained in:
@ -497,19 +497,19 @@ describe TopicsController do
|
||||
|
||||
it 'grabs first page when no filter is provided' do
|
||||
SiteSetting.stubs(:posts_per_page).returns(20)
|
||||
TopicView.any_instance.expects(:filter_posts_in_range).with(0, 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_per_page).returns(20)
|
||||
TopicView.any_instance.expects(:filter_posts_in_range).with(0, 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_per_page).returns(20)
|
||||
TopicView.any_instance.expects(:filter_posts_in_range).with(20, 40)
|
||||
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