Merge branch 'develop' into staging
This commit is contained in:
commit
4e50469d3f
2 changed files with 4 additions and 4 deletions
|
@ -168,11 +168,11 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
||||||
end
|
end
|
||||||
redirect_to backoffice_dossier_path(@dossier)
|
redirect_to backoffice_dossier_path(@dossier)
|
||||||
end
|
end
|
||||||
|
|
||||||
def reopen
|
def reopen
|
||||||
create_dossier_facade params[:dossier_id]
|
create_dossier_facade params[:dossier_id]
|
||||||
|
|
||||||
@facade.dossier.initiated!
|
@facade.dossier.replied!
|
||||||
flash.notice = 'Dossier réouvert.'
|
flash.notice = 'Dossier réouvert.'
|
||||||
|
|
||||||
redirect_to backoffice_dossiers_path
|
redirect_to backoffice_dossiers_path
|
||||||
|
|
|
@ -362,11 +362,11 @@ describe Backoffice::DossiersController, type: :controller do
|
||||||
|
|
||||||
subject { post :reopen, params: {dossier_id: dossier_id} }
|
subject { post :reopen, params: {dossier_id: dossier_id} }
|
||||||
|
|
||||||
it 'change state to initiated' do
|
it 'change state to replied' do
|
||||||
subject
|
subject
|
||||||
|
|
||||||
dossier.reload
|
dossier.reload
|
||||||
expect(dossier.state).to eq('initiated')
|
expect(dossier.state).to eq('replied')
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to redirect_to backoffice_dossiers_path }
|
it { is_expected.to redirect_to backoffice_dossiers_path }
|
||||||
|
|
Loading…
Reference in a new issue