Skip to content

Commit

Permalink
Add attachment to the test that checks if sending a message works
Browse files Browse the repository at this point in the history
to make sure it works
  • Loading branch information
jadolg committed Oct 30, 2022
1 parent a90b8e1 commit 36c1af1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ def test_chat_post_notext_message(logged_rocket):

def test_chat_post_update_delete_message(logged_rocket):
chat_post_message = logged_rocket.chat_post_message(
"hello", channel="GENERAL"
"hello", channel="GENERAL",
attachments=[
{
"color": "#ff0000",
"text": "there"
},
]
).json()
assert chat_post_message.get("channel") == "GENERAL"
assert chat_post_message.get("message").get("msg") == "hello"
assert chat_post_message.get("message").get("attachments")[0].get("color") == "#ff0000"
assert chat_post_message.get("message").get("attachments")[0].get("text") == "there"
assert chat_post_message.get("success")

with pytest.raises(RocketMissingParamException):
Expand Down

0 comments on commit 36c1af1

Please sign in to comment.