aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_unfurl.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-02-19 17:09:22 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-19 21:53:33 +0100
commitb10a3afb80b3477d9df91357b90bb949ac168f52 (patch)
tree82126e63d1853e0f9b84530586ed9aa76a51ed39 /tests/test_unfurl.py
parenta2d385bbdb7d6f2c1d7c8c9bdf9548832d8965a3 (diff)
downloadwee-slack-b10a3afb80b3477d9df91357b90bb949ac168f52.tar.gz
Only reset foreground color in with_color function
The with_color helper is usually used to set only the foreground color (currently all usages), so by only reseting the foreground we keep any existing background color. This fixes the default background on the current buffer in the buflist for muted conversations.
Diffstat (limited to 'tests/test_unfurl.py')
-rw-r--r--tests/test_unfurl.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_unfurl.py b/tests/test_unfurl.py
index aeb5e5a..15c7ad1 100644
--- a/tests/test_unfurl.py
+++ b/tests/test_unfurl.py
@@ -8,7 +8,7 @@ from slack.slack_message import SlackMessage
from tests.conftest import (
channel_public_id,
color_channel_mention,
- color_reset,
+ color_default,
color_user_mention,
color_usergroup_mention,
resolve_pending_message_item,
@@ -33,19 +33,19 @@ cases: List[Case] = [
},
{
"input": "<!channel>",
- "output": f"{color_usergroup_mention}@channel{color_reset}",
+ "output": f"{color_usergroup_mention}@channel{color_default}",
},
{
"input": "<!here>",
- "output": f"{color_usergroup_mention}@here{color_reset}",
+ "output": f"{color_usergroup_mention}@here{color_default}",
},
{
"input": f"<@{user_test1_id}|@othernick>: foo",
- "output": f"{color_user_mention}@Test_1{color_reset}: foo",
+ "output": f"{color_user_mention}@Test_1{color_default}: foo",
},
{
"input": f"foo <#{channel_public_id}|otherchannel> bar",
- "output": f"foo {color_channel_mention}#channel1{color_reset} bar",
+ "output": f"foo {color_channel_mention}#channel1{color_default} bar",
},
]