The House of Representatives voted to pass a $459 billion spending bill on Wednesday that will now go to a vote in the Senate—just two days before the latest deadline to avoid a partial government shutdown.