refactor(tests): migrate to content-based stubbing
- Replace stbbr_for_id() with stbbr_for_query()/stbbr_send() - Content-based stubbing matches stanzas by namespace instead of ID - Use regex assertions for flexible output matching - Fix timing issues in chat_session and presence tests
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
#include "prof_cmocka.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stabber.h>
|
||||
#include <expect.h>
|
||||
|
||||
#include "proftest.h"
|
||||
|
||||
@@ -47,7 +47,9 @@ connect_jid_requests_bookmarks(void **state)
|
||||
void
|
||||
connect_bad_password(void **state)
|
||||
{
|
||||
prof_input("/connect stabber@localhost server 127.0.0.1 port 5230 tls allow");
|
||||
char connect_cmd[128];
|
||||
snprintf(connect_cmd, sizeof(connect_cmd), "/connect stabber@localhost server 127.0.0.1 port %d tls allow", stub_port);
|
||||
prof_input(connect_cmd);
|
||||
prof_input("badpassword");
|
||||
|
||||
assert_true(prof_output_exact("Login failed."));
|
||||
|
||||
Reference in New Issue
Block a user