Reset Flipflop before each test
This commit is contained in:
parent
49113e8112
commit
f2139552c2
3 changed files with 2 additions and 12 deletions
|
@ -585,10 +585,6 @@ describe NewUser::DossiersController, type: :controller do
|
||||||
sign_in(user)
|
sign_in(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
|
||||||
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
subject! { get(:show, params: { id: dossier.id }) }
|
subject! { get(:show, params: { id: dossier.id }) }
|
||||||
|
|
||||||
context 'when the dossier is a brouillon' do
|
context 'when the dossier is a brouillon' do
|
||||||
|
@ -620,10 +616,6 @@ describe NewUser::DossiersController, type: :controller do
|
||||||
sign_in(user)
|
sign_in(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
|
||||||
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
subject! { get(:demande, params: { id: dossier.id }) }
|
subject! { get(:demande, params: { id: dossier.id }) }
|
||||||
|
|
||||||
it { expect(assigns(:dossier)).to eq(dossier) }
|
it { expect(assigns(:dossier)).to eq(dossier) }
|
||||||
|
|
|
@ -10,10 +10,6 @@ describe 'Dossier details:' do
|
||||||
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, true)
|
Flipflop::FeatureSet.current.test!.switch!(:new_dossier_details, true)
|
||||||
end
|
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
|
scenario 'the user can see the summary of the dossier status' do
|
||||||
visit_dossier dossier
|
visit_dossier dossier
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,8 @@ RSpec.configure do |config|
|
||||||
config.before(:each) do
|
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(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")
|
allow_any_instance_of(ProcedureLogoUploader).to receive(:generate_secure_token).and_return("3dbb3535-5388-4a37-bc2d-778327b9f998")
|
||||||
|
|
||||||
|
Flipflop::FeatureSet.current.test!.reset!
|
||||||
end
|
end
|
||||||
|
|
||||||
config.before(:all) {
|
config.before(:all) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue