diff options
author | <dafydd.harries@collabora.co.uk> | 2006-05-31 15:57:02 +0000 |
---|---|---|
committer | <dafydd.harries@collabora.co.uk> | 2006-05-31 15:57:02 +0000 |
commit | 78369331f0883004b205e5dbc43f4503f91a4b07 (patch) | |
tree | b0d5c434e206ed0906d535b331e23dbe7ec92a0d /tests | |
parent | 7d69842e2544b19304868bcb5f0f2911dc2f151e (diff) |
don't select resources by capability if priority is negative; add test for same
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-gabble-presence.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test-gabble-presence.c b/tests/test-gabble-presence.c index f5c58cf1d..a1b1fbac4 100644 --- a/tests/test-gabble-presence.c +++ b/tests/test-gabble-presence.c @@ -56,6 +56,20 @@ int main(int argc, char **argv) PRESENCE_CAP_GOOGLE_VOICE); g_assert (NULL == resource); + g_assert (FALSE == gabble_presence_update(presence, "bar", + GABBLE_PRESENCE_AVAILABLE, "dingoes", -1)); + gabble_presence_set_capabilities (presence, "bar", PRESENCE_CAP_GOOGLE_VOICE); + + resource = gabble_presence_pick_resource_by_caps (presence, + PRESENCE_CAP_GOOGLE_VOICE); + g_assert (NULL == resource); + + gabble_presence_set_capabilities (presence, "foo", PRESENCE_CAP_GOOGLE_VOICE); + + resource = gabble_presence_pick_resource_by_caps (presence, + PRESENCE_CAP_GOOGLE_VOICE); + g_assert (0 == strcmp ("foo", resource)); + return 0; } |