[fix 363] Dossier: remove next_step! action = update
This commit is contained in:
parent
629cccbf27
commit
11c010859c
3 changed files with 1 additions and 18 deletions
|
@ -83,7 +83,6 @@ class Users::DescriptionController < UsersController
|
||||||
|
|
||||||
else
|
else
|
||||||
flash.notice = 'Nouveaux fichiers envoyés' if flash.alert.nil?
|
flash.notice = 'Nouveaux fichiers envoyés' if flash.alert.nil?
|
||||||
@dossier.next_step! 'user', 'update'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return redirect_to users_dossiers_invite_path(id: current_user.invites.find_by_dossier_id(@dossier.id).id) if invite
|
return redirect_to users_dossiers_invite_path(id: current_user.invites.find_by_dossier_id(@dossier.id).id) if invite
|
||||||
|
|
|
@ -145,7 +145,7 @@ class Dossier < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def next_step! role, action, motivation = nil
|
def next_step! role, action, motivation = nil
|
||||||
unless %w(initiate follow update receive refuse without_continuation close).include?(action)
|
unless %w(initiate follow receive refuse without_continuation close).include?(action)
|
||||||
fail 'action is not valid'
|
fail 'action is not valid'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -142,12 +142,6 @@ describe Dossier do
|
||||||
context 'when user is connected' do
|
context 'when user is connected' do
|
||||||
let(:role) { 'user' }
|
let(:role) { 'user' }
|
||||||
|
|
||||||
context 'when he updates dossier informations' do
|
|
||||||
let(:action) { 'update' }
|
|
||||||
|
|
||||||
it { is_expected.to eq('brouillon') }
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when he initiate a dossier' do
|
context 'when he initiate a dossier' do
|
||||||
let(:action) { 'initiate' }
|
let(:action) { 'initiate' }
|
||||||
|
|
||||||
|
@ -161,16 +155,6 @@ describe Dossier do
|
||||||
dossier.en_construction!
|
dossier.en_construction!
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when user is connect' do
|
|
||||||
let(:role) { 'user' }
|
|
||||||
|
|
||||||
context 'when is update dossier informations' do
|
|
||||||
let(:action) { 'update' }
|
|
||||||
|
|
||||||
it { is_expected.to eq('en_construction') }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'when gestionnaire is connect' do
|
context 'when gestionnaire is connect' do
|
||||||
let(:role) { 'gestionnaire' }
|
let(:role) { 'gestionnaire' }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue