|
|
|
@ -45,11 +45,11 @@ fn print_calendar_list(cals: &Vec<Calendar>) { |
|
|
|
/// Populate sources with the following:
|
|
|
|
/// Populate sources with the following:
|
|
|
|
/// * At the last sync: both sources had A, B, C, D, E, F, G, H, I, J, K, L, M at last sync
|
|
|
|
/// * At the last sync: both sources had A, B, C, D, E, F, G, H, I, J, K, L, M at last sync
|
|
|
|
/// * Before the newer sync, this will be the content of the sources:
|
|
|
|
/// * Before the newer sync, this will be the content of the sources:
|
|
|
|
/// * server: A, C, D, E', F', G✓, H , I', K, L, M, N
|
|
|
|
/// * server: A, C, D, E', F', G✓, H , I', K✓, L, M, N
|
|
|
|
/// * cache: A, B, D', E, F'', G , H✓, I✓, J✓, K, L, M, O
|
|
|
|
/// * cache: A, B, D', E, F'', G , H✓, I✓, J✓, L, M, O
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// Hence, here is the expected result after the sync:
|
|
|
|
/// Hence, here is the expected result after the sync:
|
|
|
|
/// * both: A, D', E', F', G✓, H✓, I', K, L, M, N, O
|
|
|
|
/// * both: A, D', E', F', G✓, H✓, I', K✓, L, M, N, O
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// Notes:
|
|
|
|
/// Notes:
|
|
|
|
/// * X': name has been modified since the last sync
|
|
|
|
/// * X': name has been modified since the last sync
|
|
|
|
@ -129,6 +129,9 @@ async fn populate_test_provider() -> Provider<Cache, Cache> { |
|
|
|
|
|
|
|
|
|
|
|
cal_server.delete_item(&task_j_id); |
|
|
|
cal_server.delete_item(&task_j_id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cal_server.get_item_by_id_mut(&task_k_id).unwrap().unwrap_task_mut() |
|
|
|
|
|
|
|
.set_completed(true); |
|
|
|
|
|
|
|
|
|
|
|
let task_n = Item::Task(Task::new("task N (new from server)".into(), Utc::now())); |
|
|
|
let task_n = Item::Task(Task::new("task N (new from server)".into(), Utc::now())); |
|
|
|
cal_server.add_item(task_n); |
|
|
|
cal_server.add_item(task_n); |
|
|
|
|
|
|
|
|
|
|
|
@ -154,6 +157,8 @@ async fn populate_test_provider() -> Provider<Cache, Cache> { |
|
|
|
cal_local.get_item_by_id_mut(&task_j_id).unwrap().unwrap_task_mut() |
|
|
|
cal_local.get_item_by_id_mut(&task_j_id).unwrap().unwrap_task_mut() |
|
|
|
.set_completed(true); |
|
|
|
.set_completed(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cal_local.delete_item(&task_k_id); |
|
|
|
|
|
|
|
|
|
|
|
let task_o = Item::Task(Task::new("task O (new from local)".into(), Utc::now())); |
|
|
|
let task_o = Item::Task(Task::new("task O (new from local)".into(), Utc::now())); |
|
|
|
cal_local.add_item(task_o); |
|
|
|
cal_local.add_item(task_o); |
|
|
|
|
|
|
|
|
|
|
|
|