Update testExtractBranchNameFromBranchSpec for latest behavior