FIX: Prevent unauthorized list of private message titles. Also remove some unused code.

This commit is contained in:
Robin Ward
2013-09-30 14:35:11 -04:00
parent 40c08eab14
commit 3f0c03a20c
5 changed files with 61 additions and 66 deletions

View File

@ -243,22 +243,6 @@ describe UserAction do
)
end
it 'should collapse the inbox correctly' do
stream = UserAction.private_message_stream(UserAction::GOT_PRIVATE_MESSAGE, user_id: target_user.id, guardian: Guardian.new(target_user))
# inbox should collapse this initial and reply message into one item
stream.count.should == 1
# outbox should also collapse
stream = UserAction.private_message_stream(UserAction::NEW_PRIVATE_MESSAGE, user_id: user.id, guardian: Guardian.new(user))
stream.count.should == 1
# anon should see nothing
stream = UserAction.private_message_stream(UserAction::NEW_PRIVATE_MESSAGE, user_id: user.id, guardian: Guardian.new(nil))
stream.count.should == 0
end
end
describe 'synchronize_favorites' do