mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 20:16:21 +00:00
Added functional test for muc console message
This commit is contained in:
@@ -222,3 +222,33 @@ shows_message(void **state)
|
||||
|
||||
assert_true(prof_output_regex("testoccupant: .+a new message"));
|
||||
}
|
||||
|
||||
void
|
||||
shows_message_in_console_when_window_not_focussed(void **state)
|
||||
{
|
||||
prof_connect();
|
||||
|
||||
stbbr_for_id("prof_join_2",
|
||||
"<presence id=\"prof_join_2\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/stabber\">"
|
||||
"<c hash=\"sha-1\" xmlns=\"http://jabber.org/protocol/caps\" node=\"http://www.profanity.im\" ver=\"*\"/>"
|
||||
"<x xmlns=\"http://jabber.org/protocol/muc#user\">"
|
||||
"<item role=\"participant\" jid=\"stabber@localhost/profanity\" affiliation=\"none\"/>"
|
||||
"</x>"
|
||||
"<status code=\"110\"/>"
|
||||
"</presence>"
|
||||
);
|
||||
|
||||
prof_input("/join testroom@conference.localhost");
|
||||
assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none"));
|
||||
|
||||
prof_input("/win 1");
|
||||
prof_output_exact("Profanity. Type /help for help informatiosn.");
|
||||
|
||||
stbbr_send(
|
||||
"<message type=\"groupchat\" to=\"stabber@localhost/profanity\" from=\"testroom@conference.localhost/testoccupant\">"
|
||||
"<body>a new message</body>"
|
||||
"</message>"
|
||||
);
|
||||
|
||||
assert_true(prof_output_exact("<< incoming from testoccupant in testroom@conference.localhost (win 2)"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user