rename ref_demarche into demarche_id
fix association between formulaire and type_piece_jointe fix association between formulaire and evenement_vie
This commit is contained in:
parent
c78a4f655b
commit
107b11d510
12 changed files with 85 additions and 40 deletions
|
@ -21,10 +21,10 @@ describe Dossier do
|
|||
end
|
||||
|
||||
describe '#liste_piece_justificative' do
|
||||
subject { dossier.liste_piece_justificative }
|
||||
subject { dossier.types_piece_jointe }
|
||||
it 'returns list of required piece justificative' do
|
||||
expect(subject.size).to eq(7)
|
||||
expect(subject).to include(23)
|
||||
expect(subject).to include(TypePieceJointe.find(103))
|
||||
end
|
||||
end
|
||||
end
|
25
spec/models/formulaire_spec.rb
Normal file
25
spec/models/formulaire_spec.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Formulaire do
|
||||
describe 'assocations' do
|
||||
it { is_expected.to have_many(:types_piece_jointe) }
|
||||
it { is_expected.to belong_to(:evenement_vie) }
|
||||
end
|
||||
|
||||
describe 'attributes' do
|
||||
it { is_expected.to have_db_column(:demarche_id) }
|
||||
it { is_expected.to have_db_column(:nom) }
|
||||
it { is_expected.to have_db_column(:objet) }
|
||||
it { is_expected.to have_db_column(:ministere) }
|
||||
it { is_expected.to have_db_column(:cigle_ministere) }
|
||||
it { is_expected.to have_db_column(:direction) }
|
||||
it { is_expected.to have_db_column(:evenement_vie_id) }
|
||||
it { is_expected.to have_db_column(:publics) }
|
||||
it { is_expected.to have_db_column(:lien_demarche) }
|
||||
it { is_expected.to have_db_column(:lien_fiche_signaletique) }
|
||||
it { is_expected.to have_db_column(:lien_notice) }
|
||||
it { is_expected.to have_db_column(:categorie) }
|
||||
it { is_expected.to have_db_column(:mail_pj) }
|
||||
it { is_expected.to have_db_column(:use_admi_facile) }
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue