@@ -391,27 +391,32 @@ func TestMailtoInvalidFormat(t *testing.T) {
391391}
392392
393393func TestMailtoInvalidCname (t * testing.T ) {
394- // fails for invalid mailto links
394+ // rubdomain with just a CNAME record without MX pointers
395+ // email is still deliverable so should be accepted
396+ // the records have been carefully created to ensure this is valid and will later fall under one of the other
397+ // pass conditions
395398 hT := tTestFile ("fixtures/links/invalid_mailto_cname.html" )
396399 tExpectIssueCount (t , hT , 0 )
397400}
398401
399402func TestMailtoInvalidCnameLoop (t * testing.T ) {
400- // fails for invalid mailto links
403+ // subdomain with just a CNAME record without MX records in a loop
404+ // should be detected and fail as we can never resolve this
401405 hT := tTestFile ("fixtures/links/invalid_mailto_cname_loop.html" )
402406 tExpectIssueCount (t , hT , 1 )
403407 tExpectIssue (t , hT , "email domain could not be resolved correctly" , 1 )
404408}
405409
406410func TestMailtoInvalidNoRecords (t * testing.T ) {
407- // fails for invalid mailto links
411+ // domain with no records associated at all, must fail as completely unroutable
408412 hT := tTestFile ("fixtures/links/invalid_mailto_norecords.html" )
409413 tExpectIssueCount (t , hT , 1 )
410414 tExpectIssue (t , hT , "email domain could not be resolved correctly" , 1 )
411415}
412416
413417func TestMailtoInvalidAFallback (t * testing.T ) {
414- // fails for invalid mailto links
418+ // domain without MX records but with a valid A record
419+ // email can be routed to the A record so should be accepted
415420 hT := tTestFile ("fixtures/links/invalid_mailto_fallback.html" )
416421 tExpectIssueCount (t , hT , 0 )
417422}
0 commit comments