From d78b64982ba4b65b6e7ec4f1ce710a407724a82f Mon Sep 17 00:00:00 2001 From: Xavier J Date: Wed, 5 Oct 2016 15:01:31 +0200 Subject: [PATCH] Fix tests --- app/models/dossier.rb | 2 +- app/models/type_de_champ.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 3a17e04a7..47a28e823 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -287,8 +287,8 @@ class Dossier < ActiveRecord::Base end def reset! - entreprise.destroy etablissement.destroy + entreprise.destroy update_attributes(autorisation_donnees: false) end diff --git a/app/models/type_de_champ.rb b/app/models/type_de_champ.rb index 91ae22e30..027c6cf13 100644 --- a/app/models/type_de_champ.rb +++ b/app/models/type_de_champ.rb @@ -28,7 +28,7 @@ class TypeDeChamp < ActiveRecord::Base before_validation :change_header_section_mandatory def self.type_de_champs_list_fr - type_champs.map { |champ| [ I18n.t("activerecord.attributes.type_de_champ.type_champs.#{champ.last}"), champ.first ] } + type_champs.map { |champ| [I18n.t("activerecord.attributes.type_de_champ.type_champs.#{champ.last}"), champ.first] } end def field_for_list? @@ -37,5 +37,6 @@ class TypeDeChamp < ActiveRecord::Base def change_header_section_mandatory self.mandatory = false if self.type_champ == 'header_section' + true end end \ No newline at end of file