The Senate was expected to hold a test vote Thursday morning on a spending package as divisions over funding for the Department of Homeland Security threatens to shut down the government this weekend.