Merge pull request #7978 from colinux/fix-rna

fix(rna): date_creation may be null
This commit is contained in:
Colin Darie 2022-10-31 12:13:55 +01:00 committed by GitHub
commit c59867b456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -14,8 +14,15 @@
"type": "string"
},
"association_date_creation": {
"type": "string",
"format": "date"
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
]
},
"association_date_declaration": {
"type": "string",
@ -229,7 +236,6 @@
"required": [
"association_titre",
"association_rna",
"association_date_creation",
"association_date_declaration",
"association_date_publication"
]

View file

@ -29,7 +29,6 @@ describe APIEntreprise::RNAAdapter do
expect(subject["association_rna"]).to eq('W595001988')
expect(subject["association_titre"]).to eq('UN SUR QUATRE')
expect(subject["association_objet"]).to eq("valoriser, transmettre et partager auprès des publics les plus larges possibles, les bienfaits de l'immigration, la richesse de la diversité et la curiosité de l'autre autrement")
expect(subject["association_date_creation"]).to eq('2014-01-23')
expect(subject["association_date_declaration"]).to eq('2014-01-24')
expect(subject["association_date_publication"]).to eq('2014-02-08')
end