from fmatch.saas.operators.email_domain_match import email_domain_match


def test_match():
    assert (
        email_domain_match({"email": "sam@google.com", "company": "Google"})["value"]
        is True
    )


def test_domain_input():
    assert (
        email_domain_match({"email": "sam@acme.com", "company": "acme.com"})["value"]
        is True
    )
    assert (
        email_domain_match(
            {"email": "sam@acme.com", "company": "https://acme.com/about"}
        )["value"]
        is True
    )

