from backend.app.utils.slug import slugify


def test_slugify_basic():
    assert slugify("Bob Ross") == "bob-ross"


def test_slugify_punctuation():
    assert slugify("hello, world!") == "hello-world"


def test_slugify_unicode():
    assert slugify("naïve café") == "naive-cafe"


def test_slugify_empty():
    assert slugify("") == "untitled"


def test_slugify_only_punctuation():
    assert slugify("!!!") == "untitled"


def test_slugify_leading_trailing_spaces():
    assert slugify("  Alice  ") == "alice"
