diff options
author | James Booth <boothj5@gmail.com> | 2013-01-13 00:19:56 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-01-13 00:19:56 +0000 |
commit | 3a22719bd7a59d0eaaa6206c7fd289825365b3ff (patch) | |
tree | 317bb2ab3f9a8fe567d9072f968547082a9236e1 /tests | |
parent | 6607b998728f6c2de8c0db09d491eb304a6ca192 (diff) | |
download | profani-tty-3a22719bd7a59d0eaaa6206c7fd289825365b3ff.tar.gz |
Added jid_create_room_jid
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_jid.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_jid.c b/tests/test_jid.c index c86054bd..99ae4f12 100644 --- a/tests/test_jid.c +++ b/tests/test_jid.c @@ -105,6 +105,20 @@ void create_jid_from_bare_returns_domainpart(void) assert_string_equals("mydomain", result->domainpart); } +void create_room_jid_returns_room(void) +{ + Jid *result = jid_create_room_jid("room@conference.domain.org", "myname"); + + assert_string_equals("room@conference.domain.org", result->barejid); +} + +void create_room_jid_returns_nick(void) +{ + Jid *result = jid_create_room_jid("room@conference.domain.org", "myname"); + + assert_string_equals("myname", result->resourcepart); +} + void register_jid_tests(void) { TEST_MODULE("jid tests"); @@ -125,4 +139,6 @@ void register_jid_tests(void) TEST(create_jid_from_bare_returns_bare); TEST(create_jid_from_bare_returns_localpart); TEST(create_jid_from_bare_returns_domainpart); + TEST(create_room_jid_returns_room); + TEST(create_room_jid_returns_nick); } |