"""Unit tests for devx.utils.confirm.""" from __future__ import annotations from devx.utils.confirm import validate_confirmation class TestValidateConfirmation: def test_exact_match(self) -> None: assert validate_confirmation("deploy-production", "deploy-production") is True def test_mismatch(self) -> None: assert validate_confirmation("deploy-staging", "deploy-production") is False def test_empty_string(self) -> None: assert validate_confirmation("", "deploy-production") is False def test_case_sensitive(self) -> None: assert validate_confirmation("Deploy-Production", "deploy-production") is False def test_partial_match(self) -> None: assert validate_confirmation("deploy", "deploy-production") is False def test_extra_whitespace(self) -> None: assert validate_confirmation("deploy-production ", "deploy-production") is False def test_custom_expected(self) -> None: assert validate_confirmation("yes-delete-all", "yes-delete-all") is True