Now 48 states have winner-take-all state laws for awarding electoral votes.
2 award one electoral vote to the winner of each congressional district, and two electoral votes statewide.
 Neither method is mentioned in the U.S. Constitution.

States have enacted and can enact laws that guarantee the votes of their presidential electors

The U.S. Supreme Court has upheld state laws guaranteeing faithful voting by presidential electors (because the states have plenary power over presidential electors).

If any candidate wins the popular vote in states with 270 electoral votes, there is no reason to think that the Electoral College would not elect that candidate.