They did. Their reputation for invincibility, like a lot of reputations, included an element of myth-making. read more
During the great confrontation with Athens (the Peloponnesian War, 460–404 BC) they lost several important battles, though they never lost what the Greeks considered a “real” fight — the head-to-head clash of hoplite armies in the open field. read more
The Spartans lost quite a few battles, from early struggles in the Peloponnese, Messenia when they had to call in the Athenians to help them recover, Sphacteria after which they called a truce with Athens, several sea battles, through to the defeat at Corinth, then against Thebes at Leuctra, and as a waning power, losses during the 2nd Century BCE after which Sparta became militarily impotent. read more
Another view: The Spartans lost quite a few battles, from early struggles in the Peloponnese, Messenia when they had to call in the Athenians to help them recover, Sphacteria after which they called a truce with Athens, several sea battles, through to the defeat at Corinth, then against Thebes at Leuctra, and as a waning power, losses during the 2nd Century BCE after which Sparta became militarily impotent. read more