The race for Minneapolis mayor tested the appeal of democratic socialist policies, drawing comparisons to Zohran Mamdani’s mayoral bid in New York City.