[fix 363] Dossier: remove next_step! action = follow
This commit is contained in:
parent
11c010859c
commit
907db89371
4 changed files with 1 additions and 19 deletions
|
@ -37,7 +37,6 @@ module NewGestionnaire
|
|||
|
||||
def follow
|
||||
current_gestionnaire.follow(dossier)
|
||||
dossier.next_step!('gestionnaire', 'follow')
|
||||
flash.notice = 'Dossier suivi'
|
||||
redirect_back(fallback_location: procedures_url)
|
||||
end
|
||||
|
|
|
@ -145,7 +145,7 @@ class Dossier < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def next_step! role, action, motivation = nil
|
||||
unless %w(initiate follow receive refuse without_continuation close).include?(action)
|
||||
unless %w(initiate receive refuse without_continuation close).include?(action)
|
||||
fail 'action is not valid'
|
||||
end
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ describe NewGestionnaire::DossiersController, type: :controller do
|
|||
|
||||
describe '#follow' do
|
||||
before do
|
||||
expect_any_instance_of(Dossier).to receive(:next_step!).with('gestionnaire', 'follow')
|
||||
patch :follow, params: { procedure_id: procedure.id, dossier_id: dossier.id }
|
||||
end
|
||||
|
||||
|
|
|
@ -150,22 +150,6 @@ describe Dossier do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when dossier is at state en_construction' do
|
||||
before do
|
||||
dossier.en_construction!
|
||||
end
|
||||
|
||||
context 'when gestionnaire is connect' do
|
||||
let(:role) { 'gestionnaire' }
|
||||
|
||||
context 'when is follow' do
|
||||
let(:action) { 'follow' }
|
||||
|
||||
it { is_expected.to eq 'en_construction' }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when dossier is at state en_instruction' do
|
||||
before do
|
||||
dossier.en_instruction!
|
||||
|
|
Loading…
Reference in a new issue