from __future__ import annotations

import unittest
from pathlib import Path


SITE_ROOT = Path(__file__).resolve().parents[1]


class SharedFooterTestCase(unittest.TestCase):
    def test_footer_keeps_contact_layout_and_single_current_copyright(self) -> None:
        footer = (SITE_ROOT / "hugo/layouts/partials/footer.html").read_text(encoding="utf-8")

        self.assertNotIn('class="footer__contact-grid"', footer)
        self.assertIn('class="footer__col footer__col--info"', footer)
        self.assertLess(
            footer.index('class="footer__meta"'),
            footer.index('class="footer__brand"'),
        )
        self.assertIn('class="footer__subtitle-wrap"', footer)
        self.assertNotIn('class="footer__rights"', footer)
        self.assertIn(
            "© Copyright 2026 Inotoday Inc. All Rights Reserved.",
            footer,
        )


if __name__ == "__main__":
    unittest.main()
