fix(avatar): acknowledge BOXIM messages as read
This commit is contained in:
@@ -96,6 +96,18 @@ async def test_send_private_message_matches_boxim_payload(config):
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_mark_private_messages_read_uses_latest_message_id(config):
|
||||
mocked, client = _client_patch(request_payload={"code": 200, "data": None})
|
||||
with mocked:
|
||||
await BoxIMClient(config).mark_private_messages_read("box-token", "77", "101")
|
||||
|
||||
call = client.request.await_args
|
||||
assert call.args[:2] == ("PUT", "https://im.example/api/message/private/readed")
|
||||
assert call.kwargs["headers"] == {"accessToken": "box-token"}
|
||||
assert call.kwargs["params"] == {"friendId": 77, "messageId": 101}
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_boxim_auth_error_is_explicit(config):
|
||||
mocked, _ = _client_patch(
|
||||
|
||||
Reference in New Issue
Block a user