mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added test for missing resource on presence
This commit is contained in:
parent
091a23fc48
commit
2cb2f83ce3
@ -50,6 +50,7 @@ int main(int argc, char* argv[]) {
|
||||
PROF_FUNC_TEST(presence_set_priority),
|
||||
PROF_FUNC_TEST(presence_includes_priority),
|
||||
PROF_FUNC_TEST(presence_received),
|
||||
PROF_FUNC_TEST(presence_missing_resource_defaults),
|
||||
|
||||
PROF_FUNC_TEST(message_send),
|
||||
PROF_FUNC_TEST(message_receive),
|
||||
|
@ -241,3 +241,22 @@ presence_received(void **state)
|
||||
|
||||
assert_true(prof_output_exact("Buddy1 (mobile) is online, \"I'm here\""));
|
||||
}
|
||||
|
||||
void
|
||||
presence_missing_resource_defaults(void **state)
|
||||
{
|
||||
prof_connect();
|
||||
|
||||
stbbr_send(
|
||||
"<presence to=\"stabber@localhost\" from=\"buddy1@localhost\">"
|
||||
"<priority>15</priority>"
|
||||
"<status>My status</status>"
|
||||
"</presence>"
|
||||
);
|
||||
|
||||
assert_true(prof_output_exact("Buddy1 is online, \"My status\""));
|
||||
|
||||
prof_input("/info Buddy1");
|
||||
|
||||
assert_true(prof_output_exact("__prof_default (15), online"));
|
||||
}
|
||||
|
@ -11,3 +11,4 @@ void presence_chat_with_message(void **state);
|
||||
void presence_set_priority(void **state);
|
||||
void presence_includes_priority(void **state);
|
||||
void presence_received(void **state);
|
||||
void presence_missing_resource_defaults(void **state);
|
||||
|
Loading…
Reference in New Issue
Block a user