Browse Source

[test] Sync: properly use last_sync timestamp

github_actions
daladim 5 years ago
parent
commit
57489ee04a
  1. 3
      tests/sync.rs

3
tests/sync.rs

@ -3,7 +3,7 @@ use std::path::PathBuf;
use chrono::{Utc, TimeZone}; use chrono::{Utc, TimeZone};
use url::Url; use url::Url;
use my_tasks::traits::CalDavSource; use my_tasks::traits::{CalDavSource, SyncSlave};
use my_tasks::traits::PartialCalendar; use my_tasks::traits::PartialCalendar;
use my_tasks::cache::Cache; use my_tasks::cache::Cache;
use my_tasks::Item; use my_tasks::Item;
@ -64,6 +64,7 @@ async fn populate_test_provider() -> Provider<Cache, CachedCalendar, Cache, Cach
let task_m = Item::Task(Task::new("task M".into(), Utc.ymd(2000, 1, 12).and_hms(0, 0, 0))); let task_m = Item::Task(Task::new("task M".into(), Utc.ymd(2000, 1, 12).and_hms(0, 0, 0)));
let last_sync = task_m.last_modified(); let last_sync = task_m.last_modified();
local.update_last_sync(Some(last_sync));
assert!(last_sync < Utc::now()); assert!(last_sync < Utc::now());
let task_b_id = task_b.id().clone(); let task_b_id = task_b.id().clone();

Loading…
Cancel
Save