2019-08-06 11:02:54 +02:00
|
|
|
describe 'instructeurs/procedures/_download_dossiers.html.haml', type: :view do
|
|
|
|
let(:current_instructeur) { create(:instructeur) }
|
2017-11-28 10:24:36 +01:00
|
|
|
let(:procedure) { create(:procedure) }
|
|
|
|
|
2022-03-09 10:29:16 +01:00
|
|
|
subject { render 'instructeurs/procedures/download_dossiers.html.haml', procedure: procedure, exports: {} }
|
2017-11-28 10:24:36 +01:00
|
|
|
|
2021-04-22 08:38:34 +02:00
|
|
|
context "when procedure has at least 1 dossier" do
|
2017-11-28 10:24:36 +01:00
|
|
|
it { is_expected.to include("Télécharger tous les dossiers") }
|
2021-04-29 17:29:47 +02:00
|
|
|
|
|
|
|
context "With zip archive enabled" do
|
|
|
|
before { Flipper.enable(:archive_zip_globale, procedure) }
|
|
|
|
it { is_expected.to include("Télécharger une archive au format .zip") }
|
|
|
|
end
|
|
|
|
|
|
|
|
context "With zip archive disabled" do
|
|
|
|
before { Flipper.disable(:archive_zip_globale, procedure) }
|
|
|
|
it { is_expected.not_to include("Télécharger une archive au format .zip") }
|
|
|
|
end
|
2017-11-28 10:24:36 +01:00
|
|
|
end
|
|
|
|
end
|