Fox News contributor Jason Chaffetz said Saturday that President Trump did the right thing by signing a short-term spending bill to reopen the government.

Trump signed the bill Friday that ended the longest partial government shutdown in history and will also keep the government open until Feb. 15.

"It was a pretty savvy move," Chaffetz said on Fox & Friends, adding that he has "total confidence" in Trump. "Getting to yes means getting rid of all of the objections."

Chaffetz said that, over time, the president's ongoing battle with Democrats over border security will show that top Democrats have no plan.

"It's gonna force their members to stop hiding and to go into this conference committee -- which is the way it's supposed to work -- and actually talk about this and eventually get a border wall," he said.

The Five: Elizabeth Warren Floats 'Wealth Tax' in 2020 Bid

Chaffetz also placed blame for the 35-day government shutter solely on House Speaker Nancy Pelosi (Calif.) and Senate Minority Leader Chuck Schumer (N.Y.).

He said that the longer the issue of border security is discussed, "the more the president wins."

He also slammed Congress for being "dysfunctional" and said the power of Pelosi's fundraising is driving Democrats.

"It's also the resistance movement, who says 'no, no, no' to everything Donald Trump [says]," Chaffetz said. "But the president, I think, has actually been very tempered for this."

Watch more above.

Sen. Graham Presses Dems to Negotiate: 'You've Voted for Wall Funding In The Past'

Stirewalt: Trump Risks Losing His Base If They Believe He's 'Capitulating' to Dems on Border Wall

Roger Stone Pledges to Fight Mueller Charges: 'I Won't Bear False Witness Against the President'