test(flipper): cleanup flipper calls in tests
This commit is contained in:
parent
155c71b169
commit
03c714e86d
4 changed files with 3 additions and 12 deletions
|
@ -35,7 +35,7 @@ RSpec.describe Dossiers::MessageComponent, type: :component do
|
||||||
let(:dossier) { create(:dossier, :en_construction, commentaires: [commentaire], procedure: procedure) }
|
let(:dossier) { create(:dossier, :en_construction, commentaires: [commentaire], procedure: procedure) }
|
||||||
|
|
||||||
context 'on a procedure with anonymous instructeurs' do
|
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
|
context 'redacts the instructeur email' do
|
||||||
it { is_expected.to have_text(commentaire.body) }
|
it { is_expected.to have_text(commentaire.body) }
|
||||||
|
@ -45,7 +45,7 @@ RSpec.describe Dossiers::MessageComponent, type: :component do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on a procedure where instructeurs names are not redacted' do
|
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
|
context 'redacts the instructeur email but keeps the name' do
|
||||||
it { is_expected.to have_text(commentaire.body) }
|
it { is_expected.to have_text(commentaire.body) }
|
||||||
|
|
|
@ -1254,10 +1254,6 @@ describe Procedure do
|
||||||
Flipper.enable :zonage
|
Flipper.enable :zonage
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
|
||||||
Flipper.disable :zonage
|
|
||||||
end
|
|
||||||
|
|
||||||
let(:procedure) { create(:procedure, zones: []) }
|
let(:procedure) { create(:procedure, zones: []) }
|
||||||
|
|
||||||
subject { procedure.missing_zones? }
|
subject { procedure.missing_zones? }
|
||||||
|
@ -1278,10 +1274,6 @@ describe Procedure do
|
||||||
Flipper.enable :zonage
|
Flipper.enable :zonage
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
|
||||||
Flipper.disable :zonage
|
|
||||||
end
|
|
||||||
|
|
||||||
subject { procedure.missing_steps.include?(step) }
|
subject { procedure.missing_steps.include?(step) }
|
||||||
|
|
||||||
context 'without zone' do
|
context 'without zone' do
|
||||||
|
|
|
@ -160,7 +160,6 @@ describe 'The user' do
|
||||||
|
|
||||||
scenario 'extends dossier experation date more than one time, ', js: true do
|
scenario 'extends dossier experation date more than one time, ', js: true do
|
||||||
simple_procedure.update(procedure_expires_when_termine_enabled: true)
|
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,
|
user_old_dossier = create(:dossier,
|
||||||
procedure: simple_procedure,
|
procedure: simple_procedure,
|
||||||
created_at: simple_procedure.duree_conservation_dossiers_dans_ds.month.ago,
|
created_at: simple_procedure.duree_conservation_dossiers_dans_ds.month.ago,
|
||||||
|
|
|
@ -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
|
context 'when an expert is not allowed to invite another expert' do
|
||||||
let(:confidentiel) { false }
|
let(:confidentiel) { false }
|
||||||
before do
|
before do
|
||||||
Flipper.enable_actor(:expert_not_allowed_to_invite, avis.procedure)
|
Flipper.enable(:expert_not_allowed_to_invite, avis.procedure)
|
||||||
end
|
end
|
||||||
it { is_expected.to have_no_text("Inviter des personnes à donner leur avis") }
|
it { is_expected.to have_no_text("Inviter des personnes à donner leur avis") }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue