fix counter for dossiers suivis/à suivre when unfollow

This commit is contained in:
clemkeirua 2020-10-15 14:25:17 +02:00 committed by LeSim (Rebase PR Action)
parent 640984f9b6
commit 89316c0689
2 changed files with 14 additions and 3 deletions

View file

@ -1102,6 +1102,16 @@ describe Procedure do
it { expect(subject['suivis']).to eq(2) }
it { expect(subject['total']).to eq(2) }
end
context 'and dossier with a follower is unfollowed' do
before do
instructeur.unfollow(new_followed_dossier)
end
it { expect(subject['a_suivre']).to eq(1) }
it { expect(subject['suivis']).to eq(0) }
it { expect(subject['total']).to eq(1) }
end
end
context 'with a termine dossier' do