"""Permission definition tests."""
from app.permissions.definitions import ALL_PERMISSIONS, PERMISSION_PREFIXES


def test_all_permissions_use_sports_center_prefix():
    assert ALL_PERMISSIONS
    for perm in ALL_PERMISSIONS:
        assert perm.startswith("sports_center.")


def test_permission_prefixes_are_stable():
    assert "sports_center." in PERMISSION_PREFIXES
    assert "sports_center.memberships." in PERMISSION_PREFIXES
    assert "sports_center.devices." in PERMISSION_PREFIXES
