fix spec
This commit is contained in:
parent
286758e933
commit
686000d6cb
1 changed files with 18 additions and 14 deletions
|
@ -719,13 +719,15 @@ describe Instructeur, type: :model do
|
||||||
context 'with an archives dossier' do
|
context 'with an archives dossier' do
|
||||||
let!(:archives_dossier) { create(:dossier, :en_instruction, procedure: procedure, archived: true) }
|
let!(:archives_dossier) { create(:dossier, :en_instruction, procedure: procedure, archived: true) }
|
||||||
|
|
||||||
it { expect(subject['a_suivre']).to eq(0) }
|
it do
|
||||||
it { expect(subject['suivis']).to eq(0) }
|
expect(subject['a_suivre']).to eq(0)
|
||||||
it { expect(subject['traites']).to eq(0) }
|
expect(subject['suivis']).to eq(0)
|
||||||
it { expect(subject['tous']).to eq(0) }
|
expect(subject['traites']).to eq(0)
|
||||||
it { expect(subject['archives']).to eq(1) }
|
expect(subject['tous']).to eq(0)
|
||||||
it { expect(subject['supprimes_recemment']).to eq(0) }
|
expect(subject['archives']).to eq(1)
|
||||||
it { expect(subject['expirant']).to eq(0) }
|
expect(subject['supprimes']).to eq(0)
|
||||||
|
expect(subject['expirant']).to eq(0)
|
||||||
|
end
|
||||||
|
|
||||||
context 'and terminer dossiers on each of the others groups' do
|
context 'and terminer dossiers on each of the others groups' do
|
||||||
let!(:archives_dossier_on_gi_2) { create(:dossier, :en_instruction, groupe_instructeur: gi_2, archived: true) }
|
let!(:archives_dossier_on_gi_2) { create(:dossier, :en_instruction, groupe_instructeur: gi_2, archived: true) }
|
||||||
|
@ -742,13 +744,15 @@ describe Instructeur, type: :model do
|
||||||
let!(:expiring_dossier_en_construction) { create(:dossier, :en_construction, en_construction_at: 175.days.ago, procedure: procedure) }
|
let!(:expiring_dossier_en_construction) { create(:dossier, :en_construction, en_construction_at: 175.days.ago, procedure: procedure) }
|
||||||
before { subject }
|
before { subject }
|
||||||
|
|
||||||
it { expect(subject['a_suivre']).to eq(1) }
|
it do
|
||||||
it { expect(subject['suivis']).to eq(0) }
|
expect(subject['a_suivre']).to eq(1)
|
||||||
it { expect(subject['traites']).to eq(1) }
|
expect(subject['suivis']).to eq(0)
|
||||||
it { expect(subject['tous']).to eq(2) }
|
expect(subject['traites']).to eq(1)
|
||||||
it { expect(subject['archives']).to eq(0) }
|
expect(subject['tous']).to eq(2)
|
||||||
it { expect(subject['supprimes_recemment']).to eq(2) }
|
expect(subject['archives']).to eq(0)
|
||||||
it { expect(subject['expirant']).to eq(2) }
|
expect(subject['supprimes']).to eq(2)
|
||||||
|
expect(subject['expirant']).to eq(2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue