Gestionnaire procedures though administrateur and dossiers through procedures
This commit is contained in:
parent
de356ae0ab
commit
3effa5e9fd
2 changed files with 5 additions and 0 deletions
|
@ -5,4 +5,7 @@ class Gestionnaire < ActiveRecord::Base
|
|||
:recoverable, :rememberable, :trackable, :validatable
|
||||
|
||||
belongs_to :administrateur
|
||||
|
||||
has_many :procedures, through: :administrateur
|
||||
has_many :dossiers, through: :procedures
|
||||
end
|
||||
|
|
|
@ -18,5 +18,7 @@ describe Gestionnaire, type: :model do
|
|||
|
||||
describe 'association' do
|
||||
it { is_expected.to belong_to(:administrateur) }
|
||||
it { is_expected.to have_many(:procedures) }
|
||||
it { is_expected.to have_many(:dossiers) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue