def METHOD_NAME(atq_output):
    """
    Tests for add a job to the queue.
    """
    with patch("salt.modules.at.atq", MagicMock(return_value=atq_output)):
        assert at.at() == {"jobs": []}
        with patch.object(salt.utils.path, "which", return_value=None):
            assert (
                at.at("12:05am", "/sbin/reboot", tag="reboot")
                == "'at.at' is not available."
            )
        with patch.object(salt.utils.path, "which", return_value=True):
            with patch.dict(at.__grains__, {"os_family": "RedHat"}):
                mock = MagicMock(return_value=None)
                with patch.dict(at.__salt__, {"cmd.run": mock}):
                    assert (
                        at.at("12:05am", "/sbin/reboot", tag="reboot")
                        == "'at.at' is not available."
                    )
                mock = MagicMock(return_value="Garbled time")
                with patch.dict(at.__salt__, {"cmd.run": mock}):
                    assert at.at("12:05am", "/sbin/reboot", tag="reboot") == {
                        "jobs": [],
                        "error": "invalid timespec",
                    }
                mock = MagicMock(return_value="warning: commands\nA B")
                with patch.dict(at.__salt__, {"cmd.run": mock}):
                    with patch.dict(at.__grains__, {"os": "OpenBSD"}):
                        assert at.at("12:05am", "/sbin/reboot", tag="reboot") == {
                            "jobs": [
                                {
                                    "date": "2014-12-11",
                                    "job": 101,
                                    "queue": "A",
                                    "tag": "",
                                    "time": "19:48:47",
                                    "user": "B",
                                }
                            ]
                        }
            with patch.dict(at.__grains__, {"os_family": ""}):
                mock = MagicMock(return_value=None)
                with patch.dict(at.__salt__, {"cmd.run": mock}):
                    assert (
                        at.at("12:05am", "/sbin/reboot", tag="reboot")
                        == "'at.at' is not available."
                    )