Merge pull request #2634 from tchak/reset-flipflop

Reset Flipflop before each test
This commit is contained in:
gregoirenovel 2018-09-20 16:21:31 +02:00 committed by GitHub
commit a1c1bacce7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 12 deletions

View file

@ -585,10 +585,6 @@ describe NewUser::DossiersController, type: :controller do
sign_in(user)
end
after do
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, false)
end
subject! { get(:show, params: { id: dossier.id }) }
context 'when the dossier is a brouillon' do
@ -620,10 +616,6 @@ describe NewUser::DossiersController, type: :controller do
sign_in(user)
end
after do
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, false)
end
subject! { get(:demande, params: { id: dossier.id }) }
it { expect(assigns(:dossier)).to eq(dossier) }

View file

@ -10,10 +10,6 @@ describe 'Dossier details:' do
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, true)
end
after do
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, false)
end
scenario 'the user can see the summary of the dossier status' do
visit_dossier dossier

View file

@ -127,6 +127,8 @@ RSpec.configure do |config|
config.before(:each) do
allow_any_instance_of(PieceJustificativeUploader).to receive(:generate_secure_token).and_return("3dbb3535-5388-4a37-bc2d-778327b9f997")
allow_any_instance_of(ProcedureLogoUploader).to receive(:generate_secure_token).and_return("3dbb3535-5388-4a37-bc2d-778327b9f998")
Flipflop::FeatureSet.current.test!.reset!
end
config.before(:all) {