mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
grab highest post number from the raw data, so deletions at the end of a topic work
This commit is contained in:
@@ -106,10 +106,12 @@ describe TopicView do
|
||||
end
|
||||
|
||||
it 'allows admins to see deleted posts' do
|
||||
post_number = p3.post_number
|
||||
p3.destroy
|
||||
admin = Fabricate(:admin)
|
||||
topic_view = TopicView.new(topic.id, admin)
|
||||
topic_view.posts.count.should == 3
|
||||
topic_view.highest_post_number.should == post_number
|
||||
end
|
||||
|
||||
it 'does not allow non admins to see deleted posts' do
|
||||
@@ -117,7 +119,7 @@ describe TopicView do
|
||||
topic_view.posts.count.should == 2
|
||||
end
|
||||
|
||||
# Sam: disabled for now, we only need this for poss, if we do, roll it into topic
|
||||
# Sam: disabled for now, we only need this for polls, if we do, roll it into topic
|
||||
# having to walk every post action is not really a good idea
|
||||
#
|
||||
# context '.voted_in_topic?' do
|
||||
|
||||
Reference in New Issue
Block a user