Refacto invite dossier facades

This commit is contained in:
Xavier J 2016-12-16 14:09:05 +01:00
parent 2aebf9933c
commit d9dfff3b6a
3 changed files with 0 additions and 8 deletions

View file

@ -3,7 +3,6 @@ class DossierFacades
#TODO rechercher en fonction de la personne/email
def initialize(dossier_id, email, champ_id = nil)
@dossier = Dossier.where(archived: false).find(dossier_id)
@email = email
@champ_id = champ_id
end
@ -35,10 +34,6 @@ class DossierFacades
@dossier.ordered_commentaires.where(champ_id: @champ_id).decorate
end
def commentaire_email
@email
end
def procedure
@dossier.procedure
end

View file

@ -3,7 +3,5 @@ class InviteDossierFacades < DossierFacades
#TODO rechercher en fonction de la personne/email
def initialize dossier_id, email
@dossier = (Invite.where(email: email).find(dossier_id)).dossier
@email = email
end
end

View file

@ -12,5 +12,4 @@ describe InviteDossierFacades do
end
it { expect(subject.dossier).to eq dossier }
it { expect(subject.commentaire_email).to eq email }
end