The Senate voted to give Congress a say in the nuclear agreement with Iran, despite Republican infighting.