We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7fd947 commit 14f4d88Copy full SHA for 14f4d88
spec/models/cohort_import_row_spec.rb
@@ -88,6 +88,23 @@
88
end
89
90
91
+ context "when date of birth is in the previous century" do
92
+ let(:data) do
93
+ valid_data.merge(
94
+ { "CHILD_DATE_OF_BIRTH" => "1911-01-01", "CHILD_YEAR_GROUP" => "9" }
95
+ )
96
+ end
97
+
98
+ it "is invalid" do
99
+ expect(cohort_import_row).to be_invalid
100
+ puts cohort_import_row.errors.full_messages
101
+ expect(cohort_import_row.errors.size).to eq(1)
102
+ expect(
103
+ cohort_import_row.errors["CHILD_DATE_OF_BIRTH"]
104
+ ).to contain_exactly("is too old to still be in school")
105
106
107
108
context "with an invalid NHS number" do
109
let(:data) { { "CHILD_NHS_NUMBER" => "TP01234567" } }
110
0 commit comments