registry: add tests for IsSecure

Splitted the test from #8898
@proppy Agree that Errorf is better than Fatalf, but for consistency i'd rather have t.Fatalf here. We can have the debate another time :)