DossierController#update → #update_brouillon

This commit is contained in:
gregoirenovel 2018-09-06 10:49:26 +02:00
parent 5ac8117c69
commit 338ffb8b50
5 changed files with 12 additions and 12 deletions

View file

@ -243,7 +243,7 @@ describe NewUser::DossiersController, type: :controller do
end
end
describe '#update' do
describe '#update_brouillon' do
before { sign_in(user) }
let!(:dossier) { create(:dossier, user: user) }
let(:first_champ) { dossier.champs.first }
@ -261,7 +261,7 @@ describe NewUser::DossiersController, type: :controller do
end
let(:payload) { submit_payload }
subject { patch :update, params: payload }
subject { patch :update_brouillon, params: payload }
context 'when the dossier cannot be updated by the user' do
let!(:dossier) { create(:dossier, :en_instruction, user: user) }
@ -295,7 +295,7 @@ describe NewUser::DossiersController, type: :controller do
end
end
it 'sends an email only on the first #update' do
it 'sends an email only on the first #update_brouillon' do
delivery = double
expect(delivery).to receive(:deliver_later).with(no_args)