Use date objects when building office residences
Since the interface to select this date uses the classic multi-field interface for day, month and year, we're transforming it into a date in the Office::Residence initializer. However, the factory to build an office residence does not assign the paremeters in the initializer but using the `date_of_birth=` method, so when doing so we need to use a date instead of a string.
This commit is contained in:
@@ -38,7 +38,7 @@ describe Officing::Residence do
|
|||||||
let(:custom_residence) do
|
let(:custom_residence) do
|
||||||
build(:officing_residence,
|
build(:officing_residence,
|
||||||
document_number: "12345678Z",
|
document_number: "12345678Z",
|
||||||
date_of_birth: "01/01/1980",
|
date_of_birth: Date.parse("01/01/1980"),
|
||||||
postal_code: "28001")
|
postal_code: "28001")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user