File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def test_invalid_south_african_id_number
6666 sample = @tester . invalid_south_african_id_number
6767
6868 assert_raises Date ::Error do
69- Date . parse ( south_african_id_number_to_date_of_birth_string ( sample ) )
69+ Date . parse ( sample [ 0 .. 5 ] )
7070 end
7171 end
7272
@@ -276,15 +276,12 @@ def test_danish_id_number_invalid_gender
276276
277277 private
278278
279- def south_african_id_number_to_date_of_birth_string ( sample )
280- "19#{ sample [ 0 ..1 ] } /#{ sample [ 2 ..3 ] } /#{ sample [ 4 ..5 ] } }"
281- end
282-
283279 def assert_valid_south_african_id_number ( sample )
284280 assert_equal 13 , sample . length
285281 assert_match ( /^\d {13}$/ , sample )
286282 assert_include Faker ::IdNumber ::ZA_CITIZENSHIP_DIGITS , sample [ 10 ]
287283 assert_equal Faker ::IdNumber ::ZA_RACE_DIGIT , sample [ 11 ]
288- assert Date . parse ( south_african_id_number_to_date_of_birth_string ( sample ) )
284+
285+ assert Date . parse ( sample [ 0 ..5 ] )
289286 end
290287end
You can’t perform that action at this time.
0 commit comments