Commit 312dd45e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added test for declined call logs

parent d3685c38
......@@ -4910,10 +4910,10 @@ static void call_logs_migrate() {
int incoming_count = 0, outgoing_count = 0, missed_count = 0, aborted_count = 0, decline_count = 0, video_enabled_count = 0;
call_logs_read_from_config_file(laure->lc);
BC_ASSERT_TRUE(ms_list_size(laure->lc->call_logs) == 8);
BC_ASSERT_TRUE(ms_list_size(laure->lc->call_logs) == 10);
linphone_core_set_call_logs_database_path(laure->lc, logs_db);
BC_ASSERT_TRUE(linphone_core_get_call_history_size(laure->lc) == 8);
BC_ASSERT_TRUE(linphone_core_get_call_history_size(laure->lc) == 10);
for (; i < ms_list_size(laure->lc->call_logs); i++) {
LinphoneCallLog *log = ms_list_nth_data(laure->lc->call_logs, i);
......@@ -4938,11 +4938,11 @@ static void call_logs_migrate() {
video_enabled_count += 1;
}
}
BC_ASSERT_TRUE(incoming_count == 4);
BC_ASSERT_TRUE(outgoing_count == 4);
BC_ASSERT_TRUE(incoming_count == 5);
BC_ASSERT_TRUE(outgoing_count == 5);
BC_ASSERT_TRUE(missed_count == 1);
BC_ASSERT_TRUE(aborted_count == 3);
BC_ASSERT_TRUE(decline_count == 0);
BC_ASSERT_TRUE(decline_count == 2);
BC_ASSERT_TRUE(video_enabled_count == 3);
laure->lc->call_logs = ms_list_free_with_data(laure->lc->call_logs, (void (*)(void*))linphone_call_log_unref);
......
......@@ -85,3 +85,25 @@ duration=5
quality=4.715808
video_enabled=1
call_id=joyRwGhk-2
[call_log_8]
dir=1
status=3
from=sip:laure@sip.linphone.org
to=sip:pauline@sip.linphone.org
start_date_time=1441738122
duration=0
quality=-1.000000
video_enabled=0
call_id=az01erTY2U
[call_log_9]
dir=0
status=3
from=sip:pauline@sip.linphone.org
to=sip:laure@sip.linphone.org
start_date_time=1441738031
duration=0
quality=-1.000000
video_enabled=0
call_id=jk39dfZP0L
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