FIX: if user undos like, and relikes notify

FEATURE: roll up likes for notify on all likes
This commit is contained in:
Sam Saffron
2016-03-04 22:55:49 +11:00
parent 71911a4c67
commit 8b1772ac0f
7 changed files with 132 additions and 17 deletions

View File

@ -21,11 +21,8 @@ describe PostAlertObserver do
end
context 'when removing a liked post' do
before do
PostAction.act(evil_trout, post, PostActionType.types[:like])
end
it 'removes a notification' do
PostAction.act(evil_trout, post, PostActionType.types[:like])
expect {
PostAction.remove_act(evil_trout, post, PostActionType.types[:like])
}.to change(Notification, :count).by(-1)