about summary refs log tree commit diff stats
path: root/tests/test_contact.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-05 00:43:37 +0000
committerJames Booth <boothj5@gmail.com>2014-01-05 00:43:37 +0000
commit80acfdae9acf523b8e1feaeabfb8147d93c38220 (patch)
tree266c1f02e559acb6199170b35b1b3fe6c754c0f9 /tests/test_contact.c
parent9da4a6e1b9f13b253de3d029ef5cfb31a7109fa8 (diff)
downloadprofani-tty-80acfdae9acf523b8e1feaeabfb8147d93c38220.tar.gz
Added contact presence offline test
Diffstat (limited to 'tests/test_contact.c')
-rw-r--r--tests/test_contact.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_contact.c b/tests/test_contact.c
index 332d6fd2..4952a271 100644
--- a/tests/test_contact.c
+++ b/tests/test_contact.c
@@ -100,3 +100,16 @@ void contact_string_when_default_resource(void **state)
     p_contact_free(contact);
     free(str);
 }
+
+void contact_presence_offline(void **state)
+{
+    PContact contact = p_contact_new("bob@server.com", "bob", NULL, "both",
+        "is offline", FALSE);
+
+    const char *presence = p_contact_presence(contact);
+
+    assert_string_equal("offline", presence);
+
+    p_contact_free(contact);
+
+}