Individual: save the birthdate in Y

This commit is contained in:
simon lehericey 2018-04-03 11:57:16 +02:00
parent 0093db18a1
commit 8828663880
2 changed files with 13 additions and 0 deletions

View file

@ -23,6 +23,7 @@ describe Individual do
it { expect(individual.valid?).to be true }
it { expect(individual.birthdate).to eq("1980-11-12") }
it { expect(individual.second_birthdate).to eq(Date.new(1980, 11, 12)) }
end
context "and the format is ISO" do
@ -30,6 +31,7 @@ describe Individual do
it { expect(individual.valid?).to be true }
it { expect(individual.birthdate).to eq("1980-11-12") }
it { expect(individual.second_birthdate).to eq(Date.new(1980, 11, 12)) }
end
context "and the format is WTF" do
@ -37,6 +39,7 @@ describe Individual do
it { expect(individual.valid?).to be false }
it { expect(individual.birthdate).to eq("1980 1 12") }
it { expect(individual.second_birthdate).to be_nil }
end
end
end