diff --git a/spec/components/dossiers/message_component_spec.rb b/spec/components/dossiers/message_component_spec.rb index 9fb4b9d99..b159912c2 100644 --- a/spec/components/dossiers/message_component_spec.rb +++ b/spec/components/dossiers/message_component_spec.rb @@ -35,7 +35,7 @@ RSpec.describe Dossiers::MessageComponent, type: :component do let(:dossier) { create(:dossier, :en_construction, commentaires: [commentaire], procedure: procedure) } context 'on a procedure with anonymous instructeurs' do - before { Flipper.enable_actor(:hide_instructeur_email, procedure) } + before { Flipper.enable(:hide_instructeur_email, procedure) } context 'redacts the instructeur email' do it { is_expected.to have_text(commentaire.body) } @@ -45,7 +45,7 @@ RSpec.describe Dossiers::MessageComponent, type: :component do end context 'on a procedure where instructeurs names are not redacted' do - before { Flipper.disable_actor(:hide_instructeur_email, procedure) } + before { Flipper.disable(:hide_instructeur_email, procedure) } context 'redacts the instructeur email but keeps the name' do it { is_expected.to have_text(commentaire.body) } diff --git a/spec/models/procedure_spec.rb b/spec/models/procedure_spec.rb index 8080cec63..0dc5e5a50 100644 --- a/spec/models/procedure_spec.rb +++ b/spec/models/procedure_spec.rb @@ -1254,10 +1254,6 @@ describe Procedure do Flipper.enable :zonage end - after do - Flipper.disable :zonage - end - let(:procedure) { create(:procedure, zones: []) } subject { procedure.missing_zones? } @@ -1278,10 +1274,6 @@ describe Procedure do Flipper.enable :zonage end - after do - Flipper.disable :zonage - end - subject { procedure.missing_steps.include?(step) } context 'without zone' do diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb index 44e7cef76..062b39913 100644 --- a/spec/system/users/brouillon_spec.rb +++ b/spec/system/users/brouillon_spec.rb @@ -160,7 +160,6 @@ describe 'The user' do scenario 'extends dossier experation date more than one time, ', js: true do simple_procedure.update(procedure_expires_when_termine_enabled: true) - allow(simple_procedure).to receive(:feature_enabled?).with(:procedure_process_expired_dossiers_termine).and_return(true) user_old_dossier = create(:dossier, procedure: simple_procedure, created_at: simple_procedure.duree_conservation_dossiers_dans_ds.month.ago, diff --git a/spec/views/experts/avis/instruction.html.haml_spec.rb b/spec/views/experts/avis/instruction.html.haml_spec.rb index 8b7afc3be..5ce2a54ef 100644 --- a/spec/views/experts/avis/instruction.html.haml_spec.rb +++ b/spec/views/experts/avis/instruction.html.haml_spec.rb @@ -27,7 +27,7 @@ describe 'experts/avis/instruction.html.haml', type: :view do context 'when an expert is not allowed to invite another expert' do let(:confidentiel) { false } before do - Flipper.enable_actor(:expert_not_allowed_to_invite, avis.procedure) + Flipper.enable(:expert_not_allowed_to_invite, avis.procedure) end it { is_expected.to have_no_text("Inviter des personnes à donner leur avis") } end