fix(fork): don't fail when user submit twice en_construction (from 2 tabs)
This commit is contained in:
parent
d3028f5570
commit
059dabb5ac
4 changed files with 23 additions and 1 deletions
|
@ -512,6 +512,17 @@ describe Users::DossiersController, type: :controller do
|
|||
expect(response).to redirect_to(dossier_path(dossier))
|
||||
end
|
||||
end
|
||||
|
||||
context 'when dossier was already submitted' do
|
||||
before { post :submit_en_construction, params: payload }
|
||||
|
||||
it 'redirects to the dossier' do
|
||||
subject
|
||||
|
||||
expect(response).to redirect_to(dossier_path(dossier))
|
||||
expect(flash.alert).to eq("Les modifications ont déjà été déposées")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#update brouillon' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue