Rep. Kevin McCarthy of Bakersfield faced an immediate test as his ascension to House majority leader became official Thursday, as he and other Republican leaders struggled to build support for their bill to provide emergency funds for the immigration crisis on the southern border.