diff options
author | James Booth <boothj5@gmail.com> | 2015-07-23 00:43:20 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-07-23 00:43:20 +0100 |
commit | 3985f22250bb5aca0036c707da47e51c662cee03 (patch) | |
tree | 8c1d21fda3e70e3da257b602485a14749d7e1efe | |
parent | e55ef63f617d74a450d6d6d59029782697fe1442 (diff) | |
parent | decd5066cecb6a46a1cd8e44bebc5f70cc5a3a5d (diff) | |
download | profani-tty-3985f22250bb5aca0036c707da47e51c662cee03.tar.gz |
Merge branch 'master' into help
-rw-r--r-- | tests/functionaltests/proftest.c | 21 | ||||
-rw-r--r-- | tests/functionaltests/test_roster.c | 14 |
2 files changed, 17 insertions, 18 deletions
diff --git a/tests/functionaltests/proftest.c b/tests/functionaltests/proftest.c index 403e47d7..4618e257 100644 --- a/tests/functionaltests/proftest.c +++ b/tests/functionaltests/proftest.c @@ -212,7 +212,18 @@ prof_output_regex(char *text) void prof_connect_with_roster(char *roster) { - stbbr_for_query("jabber:iq:roster", roster); + GString *roster_str = g_string_new( + "<iq type=\"result\" to=\"stabber@localhost/profanity\">" + "<query xmlns=\"jabber:iq:roster\" ver=\"362\">" + ); + g_string_append(roster_str, roster); + g_string_append(roster_str, + "</query>" + "</iq>" + ); + + stbbr_for_query("jabber:iq:roster", roster_str->str); + g_string_free(roster_str, TRUE); stbbr_for_id("prof_presence_1", "<presence id=\"prof_presence_1\" lang=\"en\" to=\"stabber@localhost/profanity\" from=\"stabber@localhost/profanity\">" @@ -235,11 +246,7 @@ void prof_connect(void) { prof_connect_with_roster( - "<iq type=\"result\" to=\"stabber@localhost/profanity\">" - "<query xmlns=\"jabber:iq:roster\" ver=\"362\">" - "<item jid=\"buddy1@localhost\" subscription=\"both\" name=\"Buddy1\"/>" - "<item jid=\"buddy2@localhost\" subscription=\"both\" name=\"Buddy2\"/>" - "</query>" - "</iq>" + "<item jid=\"buddy1@localhost\" subscription=\"both\" name=\"Buddy1\"/>" + "<item jid=\"buddy2@localhost\" subscription=\"both\" name=\"Buddy2\"/>" ); } diff --git a/tests/functionaltests/test_roster.c b/tests/functionaltests/test_roster.c index ba1c851a..7a3f5656 100644 --- a/tests/functionaltests/test_roster.c +++ b/tests/functionaltests/test_roster.c @@ -67,12 +67,8 @@ void sends_remove_item(void **state) { prof_connect_with_roster( - "<iq type=\"result\" to=\"stabber@localhost/profanity\">" - "<query xmlns=\"jabber:iq:roster\" ver=\"362\">" - "<item jid=\"buddy1@localhost\" subscription=\"both\"/>" - "<item jid=\"buddy2@localhost\" subscription=\"both\"/>" - "</query>" - "</iq>" + "<item jid=\"buddy1@localhost\" subscription=\"both\"/>" + "<item jid=\"buddy2@localhost\" subscription=\"both\"/>" ); stbbr_for_query("jabber:iq:roster", @@ -100,11 +96,7 @@ void sends_nick_change(void **state) { prof_connect_with_roster( - "<iq type=\"result\" to=\"stabber@localhost/profanity\">" - "<query xmlns=\"jabber:iq:roster\" ver=\"362\">" - "<item jid=\"buddy1@localhost\" subscription=\"both\"/>" - "</query>" - "</iq>" + "<item jid=\"buddy1@localhost\" subscription=\"both\"/>" ); prof_input("/roster nick buddy1@localhost Buddy1"); |