Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/test_inbox_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ def test_denied_and_approved_word_forms(tmp_path):
assert store.get(b.id).resolution == "allow"


def test_negated_denial_is_not_parsed_as_allow(tmp_path):
"""A denial phrased with an allow word ("no, don't approve") must never release the item."""
store = InboxStore(tmp_path / "inbox.json")
for phrasing in ("no, don't approve", "not allowed", "no, do not allow this"):
item = store.add_approval("s1", "Deploy?", inbox="ops")
resolve_from_reply(f"{phrasing} [ow:{item.id}]", store.resolve)
assert store.get(item.id).resolution != "allow"


def test_emoji_reactions_still_resolve(tmp_path):
store = InboxStore(tmp_path / "inbox.json")
a = store.add_approval("s1", "Deploy?", inbox="ops")
Expand Down
Loading