summaryrefslogtreecommitdiff
path: root/tests/test-gabble-presence.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-gabble-presence.c')
-rw-r--r--tests/test-gabble-presence.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-gabble-presence.c b/tests/test-gabble-presence.c
index a1b1fbac4..f975f02b0 100644
--- a/tests/test-gabble-presence.c
+++ b/tests/test-gabble-presence.c
@@ -70,6 +70,18 @@ int main(int argc, char **argv)
PRESENCE_CAP_GOOGLE_VOICE);
g_assert (0 == strcmp ("foo", resource));
+ /* presence turns up from null resource; it trumps other presence regardless
+ * of whether status is more present or not */
+ g_assert (TRUE == gabble_presence_update (presence, NULL,
+ GABBLE_PRESENCE_OFFLINE, "gone", 0));
+ g_assert (GABBLE_PRESENCE_OFFLINE == presence->status);
+ g_assert (0 == strcmp("gone", presence->status_message));
+
+ /* caps are gone too */
+ resource = gabble_presence_pick_resource_by_caps (presence,
+ PRESENCE_CAP_GOOGLE_VOICE);
+ g_assert (NULL == resource);
+
return 0;
}