Manage GET prefill by creating a dossier
This commit is contained in:
parent
802a23057b
commit
deb51e3880
5 changed files with 30 additions and 37 deletions
|
@ -15,16 +15,6 @@ describe Users::CommencerController, type: :controller do
|
|||
expect(assigns(:procedure)).to eq published_procedure
|
||||
expect(assigns(:revision)).to eq published_procedure.published_revision
|
||||
end
|
||||
|
||||
context 'when there are query params' do
|
||||
subject { get :commencer, params: { path: path, any_param: "any param" } }
|
||||
|
||||
it "stores the parameters in session" do
|
||||
subject
|
||||
|
||||
expect(session[:stored_params]).to be_present
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the path is for a draft procedure' do
|
||||
|
|
|
@ -1082,10 +1082,6 @@ describe Users::DossiersController, type: :controller do
|
|||
}
|
||||
}
|
||||
|
||||
before { session[:stored_params] = params.to_json }
|
||||
|
||||
it { expect { subject }.to change { session[:stored_params] }.to(nil) }
|
||||
|
||||
it { expect { subject }.to change { Dossier.count }.by(1) }
|
||||
|
||||
it "prefills the dossier's champs with the given values" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue