When 45 was asked how his ban would work in practical terms he said they, [border guards] would ask, ‘Are you Muslim?’ .  Then days later he pointed to Roosevelt’s forced internment of Japanese-Americans at the beginning of World War II as similar.  

He can do 'whatever' he wants, as long as it doesn't contravene the Constitution, a religious test is a contravention.