[fix 363] Dossier: remove next_step! action = update

This commit is contained in:
Simon Lehericey 2017-12-05 16:56:52 +01:00 committed by LeSim
parent 629cccbf27
commit 11c010859c
3 changed files with 1 additions and 18 deletions

View file

@ -83,7 +83,6 @@ class Users::DescriptionController < UsersController
else
flash.notice = 'Nouveaux fichiers envoyés' if flash.alert.nil?
@dossier.next_step! 'user', 'update'
end
return redirect_to users_dossiers_invite_path(id: current_user.invites.find_by_dossier_id(@dossier.id).id) if invite

View file

@ -145,7 +145,7 @@ class Dossier < ActiveRecord::Base
end
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'
end

View file

@ -142,12 +142,6 @@ describe Dossier do
context 'when user is connected' do
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
let(:action) { 'initiate' }
@ -161,16 +155,6 @@ describe Dossier do
dossier.en_construction!
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
let(:role) { 'gestionnaire' }