parent
87a43274f1
commit
0eaf6d7693
2 changed files with 34 additions and 2 deletions
|
@ -118,5 +118,15 @@ describe StatusThreadingConcern do
|
|||
viewer.block_domain!('example.com')
|
||||
expect(status.descendants(4, viewer)).to_not include(reply2)
|
||||
end
|
||||
|
||||
it 'promotes self-replies to the top while leaving the rest in order' do
|
||||
a = Fabricate(:status, account: alice)
|
||||
d = Fabricate(:status, account: jeff, thread: a)
|
||||
e = Fabricate(:status, account: bob, thread: d)
|
||||
c = Fabricate(:status, account: alice, thread: a)
|
||||
f = Fabricate(:status, account: bob, thread: c)
|
||||
|
||||
expect(a.descendants(20)).to eq [c, d, e, f]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue