summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-03-02 15:01:20 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2011-03-03 17:21:50 +0000
commit21003231466b39ba3acb30f827f5ac5c70304f0c (patch)
treeab2422ea84c842e151ede575aea507e3f11f2e83 /tests
parent98111e64216f98434dd09e7b9e1c4ed8e0ab8520 (diff)
wocky_stanza_build_iq_error(): include query.
XMPP Core says that IQ errors SHOULD include the query from the original request. wocky_stanza_build_iq_error() should do this for us.
Diffstat (limited to 'tests')
-rw-r--r--tests/wocky-pubsub-service-test.c13
-rw-r--r--tests/wocky-stanza-test.c6
2 files changed, 3 insertions, 16 deletions
diff --git a/tests/wocky-pubsub-service-test.c b/tests/wocky-pubsub-service-test.c
index eba765e..7f4e9bf 100644
--- a/tests/wocky-pubsub-service-test.c
+++ b/tests/wocky-pubsub-service-test.c
@@ -198,12 +198,6 @@ test_get_default_node_configuration_insufficient_iq_cb (WockyPorter *porter,
WockyStanza *reply;
reply = wocky_stanza_build_iq_error (stanza,
- '(', "pubsub",
- ':', WOCKY_XMPP_NS_PUBSUB_OWNER,
- '(', "configure",
- '@', "node", "node1",
- ')',
- ')',
'(', "error",
'@', "type", "auth",
'(', "forbidden",
@@ -348,13 +342,6 @@ test_create_node_unsupported_iq_cb (WockyPorter *porter,
WockyStanza *reply;
reply = wocky_stanza_build_iq_error (stanza,
- '(', "pubsub",
- ':', WOCKY_XMPP_NS_PUBSUB,
- '(', "create",
- '@', "node", "node1",
- ')',
- '(', "configure", ')',
- ')',
'(', "error",
'@', "type", "cancel",
'(', "feature-not-implemented",
diff --git a/tests/wocky-stanza-test.c b/tests/wocky-stanza-test.c
index 14f8c85..51de89d 100644
--- a/tests/wocky-stanza-test.c
+++ b/tests/wocky-stanza-test.c
@@ -110,6 +110,9 @@ test_build_iq_error (void)
expected = wocky_stanza_build (WOCKY_STANZA_TYPE_IQ,
WOCKY_STANZA_SUB_TYPE_ERROR, "romeo@example.net", "juliet@example.com",
'@', "id", "one",
+ '(', "query",
+ ':', "http://jabber.org/protocol/disco#items",
+ ')',
NULL);
reply = wocky_stanza_build_iq_error (iq, NULL);
@@ -134,9 +137,6 @@ test_build_iq_error (void)
NULL);
reply = wocky_stanza_build_iq_error (iq,
- '(', "query",
- ':', "http://jabber.org/protocol/disco#items",
- ')',
'(', "error",
'@', "code", "403",
'@', "type", "auth",