mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 02:46:21 +00:00
Call UI disconnect functions before disconnecting with /disconnect
fixes #703
This commit is contained in:
24
tests/functionaltests/test_disconnect.c
Normal file
24
tests/functionaltests/test_disconnect.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <glib.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <stabber.h>
|
||||
#include <expect.h>
|
||||
|
||||
#include "proftest.h"
|
||||
|
||||
void
|
||||
disconnect_ends_session(void **state)
|
||||
{
|
||||
prof_connect();
|
||||
|
||||
prof_input("/disconnect");
|
||||
assert_true(prof_output_exact("stabber@localhost/profanity logged out successfully."));
|
||||
|
||||
prof_input("/roster");
|
||||
assert_true(prof_output_exact("You are not currently connected."));
|
||||
}
|
||||
Reference in New Issue
Block a user