from src.domain.feature_packs.notify_emails import notify_emails_from_text


def test_named_notify_emails_are_collected_in_order():
    text = (
        "Build the laundry site and send contact form notifications to "
        "mohsin@pie-solutions.com and duffyace@gmail.com."
    )
    assert notify_emails_from_text(text) == "mohsin@pie-solutions.com, duffyace@gmail.com"


def test_placeholder_and_unrelated_emails_are_ignored():
    text = (
        "Put owner@example.com on the about page and keep hours@localhost as copy. "
        "The map embed is unrelated."
    )
    assert notify_emails_from_text(text) == ""
