Commit e71e2dd5 authored by Benjamin REIS's avatar Benjamin REIS
Browse files

begin testing bodyless subscription

parent 6c8cc269
......@@ -1731,8 +1731,6 @@ static void publish_with_network_state_changes(void) {
BC_ASSERT_TRUE(wait_for(marie->lc,marie->lc,&marie->stat.number_of_LinphonePublishProgress,2));
BC_ASSERT_TRUE(wait_for(marie->lc,marie->lc,&marie->stat.number_of_LinphonePublishOk,2));
linphone_core_manager_stop(marie);
BC_ASSERT_EQUAL(marie->stat.number_of_LinphonePublishCleared,1,int,"%i"); /*yes it is 3 because when we change the expires, a new LinphoneEvent is created*/
BC_ASSERT_EQUAL(marie->stat.number_of_LinphonePublishOk,2,int,"%i");
......@@ -1746,7 +1744,19 @@ static void publish_with_network_state_changes(void) {
BC_ASSERT_TRUE(wait_for(pauline->lc,pauline->lc,&pauline->stat.number_of_LinphonePresenceActivityAway,1));
linphone_friend_unref(marie_as_friend);
linphone_core_manager_destroy(pauline);
}
static void simple_bodyless_list_subscription(void) {
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
LinphoneFriendList *friendList = linphone_core_create_friend_list(marie->lc);
friendList->display_name = "Friends";
friendList->bodyless_subscription = TRUE;
linphone_friend_list_set_rls_uri(friendList, "sip:rls@sip.example.org");
linphone_friend_list_enable_subscriptions(TRUE);
BC_ASSERT_TRUE(wait_for_until(marie->lc, NULL, &marie->stat.number_of_NotifyPresenceReceived, 1, 4000));
linphone_core_manager_destroy(pauline);
}
test_t presence_server_tests[] = {
......@@ -1779,6 +1789,7 @@ test_t presence_server_tests[] = {
TEST_NO_TAG("Extended notify only when both side subscribed to each other 2", extended_notify_only_both_side_subscribed2),
TEST_NO_TAG("Extended notify only when subscribe then unsubscribe then re-subscribe", extended_notify_sub_unsub_sub),
TEST_NO_TAG("Extended notify only when subscribe then unsubscribe then re-subscribe 2", extended_notify_sub_unsub_sub2),
TEST_ONE_TAG("Simple bodyless list subscription", simple_bodyless_list_subscription, "bodyless"),
};
test_suite_t presence_server_test_suite = {"Presence using server", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment