Add original states restoration after some tests

To avoid failing tests
This commit is contained in:
gregoirenovel 2018-09-07 10:31:39 +02:00
parent 23405efd3a
commit 095166e38f

View file

@ -585,6 +585,10 @@ 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
@ -616,6 +620,10 @@ 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) }