diff options
author | James Booth <boothj5@gmail.com> | 2012-10-03 23:47:10 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-10-03 23:47:10 +0100 |
commit | f8de28232e353794617e402dc0ebf05b57728cc5 (patch) | |
tree | 3f408360f1848c182e07eea14949f9c37a4901c3 /tests/test_chat_session.c | |
parent | cf211be2214d86c5709b407d8ec1691740ee0a5c (diff) | |
download | profani-tty-f8de28232e353794617e402dc0ebf05b57728cc5.tar.gz |
Started work on chat session, and chat states
Diffstat (limited to 'tests/test_chat_session.c')
-rw-r--r-- | tests/test_chat_session.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_chat_session.c b/tests/test_chat_session.c new file mode 100644 index 00000000..7c513fc7 --- /dev/null +++ b/tests/test_chat_session.c @@ -0,0 +1,25 @@ +#include <stdio.h> +#include <head-unit.h> +#include "chat_session.h" + +void can_init(void) +{ + chat_session_init(); + assert_true(1); +} + +void adding_new_sets_state_to_active(void) +{ + chat_session_init(); + chat_session_new("prof1@panesar"); + ChatSession session = chat_session_get("prof1@panesar"); + + assert_int_equals(ACTIVE, chat_session_get_state(session)); +} + +void register_chat_session_tests(void) +{ + TEST_MODULE("chat_session_tests"); + TEST(can_init); + TEST(adding_new_sets_state_to_active); +} |