instructors : receive daily emails for declarative folders
This commit is contained in:
parent
50af70ad7c
commit
395af2fbb0
5 changed files with 181 additions and 0 deletions
|
@ -16,6 +16,8 @@ describe 'instructeur_mailer/send_notifications.html.haml', type: :view do
|
|||
procedure_libelle: 'une superbe démarche',
|
||||
procedure_id: 213,
|
||||
nb_en_construction: 1,
|
||||
nb_en_instruction: 0,
|
||||
nb_accepted: 0,
|
||||
nb_notification: 0
|
||||
}
|
||||
]
|
||||
|
@ -27,6 +29,50 @@ describe 'instructeur_mailer/send_notifications.html.haml', type: :view do
|
|||
it { expect(rendered).not_to have_text('notification') }
|
||||
end
|
||||
|
||||
context 'when there is one declarated dossier in instruction' do
|
||||
let(:data) do
|
||||
[
|
||||
{
|
||||
procedure_libelle: 'une superbe démarche',
|
||||
procedure_id: 213,
|
||||
nb_en_construction: 0,
|
||||
nb_en_instruction: 1,
|
||||
nb_accepted: 0,
|
||||
nb_notification: 0
|
||||
}
|
||||
]
|
||||
end
|
||||
|
||||
it { expect(rendered).to have_link('une superbe démarche', href: procedure_url(213)) }
|
||||
it { expect(rendered).to have_text('une superbe démarche') }
|
||||
it { expect(rendered).to have_text('1 dossier') }
|
||||
it { expect(rendered).not_to have_text('notification') }
|
||||
it { expect(rendered).not_to have_text('construction') }
|
||||
it { expect(rendered).not_to have_text('accepte') }
|
||||
end
|
||||
|
||||
context 'when there is one declarated dossier in accepte' do
|
||||
let(:data) do
|
||||
[
|
||||
{
|
||||
procedure_libelle: 'une superbe démarche',
|
||||
procedure_id: 213,
|
||||
nb_en_construction: 0,
|
||||
nb_en_instruction: 0,
|
||||
nb_accepted: 1,
|
||||
nb_notification: 0
|
||||
}
|
||||
]
|
||||
end
|
||||
|
||||
it { expect(rendered).to have_link('une superbe démarche', href: procedure_url(213)) }
|
||||
it { expect(rendered).to have_text('une superbe démarche') }
|
||||
it { expect(rendered).to have_text('1 dossier') }
|
||||
it { expect(rendered).not_to have_text('notification') }
|
||||
it { expect(rendered).not_to have_text('construction') }
|
||||
it { expect(rendered).not_to have_text('instruction') }
|
||||
end
|
||||
|
||||
context 'when there is one notification' do
|
||||
let(:data) do
|
||||
[
|
||||
|
@ -34,6 +80,8 @@ describe 'instructeur_mailer/send_notifications.html.haml', type: :view do
|
|||
procedure_libelle: 'une superbe démarche',
|
||||
procedure_id: 213,
|
||||
nb_en_construction: 0,
|
||||
nb_en_instruction: 0,
|
||||
nb_accepted: 0,
|
||||
nb_notification: 1
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue