feat(api particulier): add MESRI support to sources service
This commit is contained in:
parent
693a95904e
commit
66a9109cd7
2 changed files with 29 additions and 1 deletions
|
@ -80,7 +80,13 @@ module APIParticulier
|
||||||
'pole_emploi_identite' => ['pole_emploi', 'identite'],
|
'pole_emploi_identite' => ['pole_emploi', 'identite'],
|
||||||
'pole_emploi_adresse' => ['pole_emploi', 'adresse'],
|
'pole_emploi_adresse' => ['pole_emploi', 'adresse'],
|
||||||
'pole_emploi_contact' => ['pole_emploi', 'contact'],
|
'pole_emploi_contact' => ['pole_emploi', 'contact'],
|
||||||
'pole_emploi_inscription' => ['pole_emploi', 'inscription']
|
'pole_emploi_inscription' => ['pole_emploi', 'inscription'],
|
||||||
|
'mesri_identifiant' => ['mesri', 'identifiant'],
|
||||||
|
'mesri_identite' => ['mesri', 'identite'],
|
||||||
|
'mesri_inscription_etudiant' => ['mesri', 'inscriptions'],
|
||||||
|
'mesri_inscription_autre' => ['mesri', 'inscriptions'],
|
||||||
|
'mesri_admission' => ['mesri', 'admissions'],
|
||||||
|
'mesri_etablissements' => ['mesri', 'etablissements']
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -123,6 +129,13 @@ module APIParticulier
|
||||||
'adresse' => ['INSEECommune', 'codePostal', 'localite', 'ligneVoie', 'ligneComplementDestinataire', 'ligneComplementAdresse', 'ligneComplementDistribution', 'ligneNom'],
|
'adresse' => ['INSEECommune', 'codePostal', 'localite', 'ligneVoie', 'ligneComplementDestinataire', 'ligneComplementAdresse', 'ligneComplementDistribution', 'ligneNom'],
|
||||||
'contact' => ['email', 'telephone', 'telephone2'],
|
'contact' => ['email', 'telephone', 'telephone2'],
|
||||||
'inscription' => ['dateInscription', 'dateCessationInscription', 'codeCertificationCNAV', 'codeCategorieInscription', 'libelleCategorieInscription']
|
'inscription' => ['dateInscription', 'dateCessationInscription', 'codeCertificationCNAV', 'codeCategorieInscription', 'libelleCategorieInscription']
|
||||||
|
},
|
||||||
|
'mesri' => {
|
||||||
|
'identifiant' => ['ine'],
|
||||||
|
'identite' => ['nom', 'prenom', 'dateNaissance'],
|
||||||
|
'inscriptions' => ['statut', 'regime', 'dateDebutInscription', 'dateFinInscription', 'codeCommune'],
|
||||||
|
'admissions' => ['statut', 'regime', 'dateDebutAdmission', 'dateFinAdmission', 'codeCommune'],
|
||||||
|
'etablissements' => ['uai', 'nom']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -62,6 +62,21 @@ describe APIParticulier::Services::SourcesService do
|
||||||
it { is_expected.to match(pole_emploi_identite_et_adresse) }
|
it { is_expected.to match(pole_emploi_identite_et_adresse) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when a procedure has a mesri_identite and a mesri_etablissements scopes' do
|
||||||
|
let(:api_particulier_scopes) { ['mesri_identite', 'mesri_etablissements'] }
|
||||||
|
|
||||||
|
let(:mesri_identite_and_etablissements) do
|
||||||
|
{
|
||||||
|
'mesri' => {
|
||||||
|
'identite' => ['nom', 'prenom', 'dateNaissance'],
|
||||||
|
'etablissements' => ['uai', 'nom']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to match(mesri_identite_and_etablissements) }
|
||||||
|
end
|
||||||
|
|
||||||
context 'when a procedure has an unknown scope' do
|
context 'when a procedure has an unknown scope' do
|
||||||
let(:api_particulier_scopes) { ['unknown_scope'] }
|
let(:api_particulier_scopes) { ['unknown_scope'] }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue