JMAP for Calendars implementation (part 4)
This commit is contained in:
@@ -469,7 +469,7 @@ pub async fn test_filter(db: Store, fts: FtsStore) {
|
||||
db.get_value::<String>(ValueKey {
|
||||
account_id: 0,
|
||||
collection: COLLECTION_ID.into(),
|
||||
document_id: document_id as u32,
|
||||
document_id: document_id.document_id(),
|
||||
class: ValueClass::Property(fields_u8["accession_number"]),
|
||||
})
|
||||
.await
|
||||
@@ -559,7 +559,7 @@ pub async fn test_sort(db: Store) {
|
||||
db.get_value::<String>(ValueKey {
|
||||
account_id: 0,
|
||||
collection: COLLECTION_ID.into(),
|
||||
document_id: document_id as u32,
|
||||
document_id: document_id.document_id(),
|
||||
class: ValueClass::Property(fields["accession_number"]),
|
||||
})
|
||||
.await
|
||||
|
||||
@@ -6,17 +6,14 @@
|
||||
|
||||
use super::WebDavTest;
|
||||
use ahash::AHashSet;
|
||||
use calcard::{
|
||||
common::timezone::Tz,
|
||||
icalendar::{ICalendar, dates::CalendarEvent},
|
||||
};
|
||||
use dav_proto::schema::property::TimeRange;
|
||||
use calcard::{common::timezone::Tz, icalendar::ICalendar};
|
||||
use groupware::{
|
||||
DavResourceName,
|
||||
calendar::{CalendarEventData, alarm::ExpandAlarm},
|
||||
calendar::{CalendarEventData, alarm::ExpandAlarm, expand::CalendarEventExpansion},
|
||||
};
|
||||
use hyper::StatusCode;
|
||||
use store::write::serialize::rkyv_unarchive;
|
||||
use types::TimeRange;
|
||||
|
||||
pub async fn test(test: &WebDavTest) {
|
||||
println!("Running REPORT calendar-query & free-busy-query tests...");
|
||||
@@ -219,7 +216,8 @@ fn roundtrip_expansion(ics: &str, ignore_errors: bool) {
|
||||
let mut events = expanded
|
||||
.events
|
||||
.into_iter()
|
||||
.map(|e| {
|
||||
.enumerate()
|
||||
.map(|(i, e)| {
|
||||
let e = e.try_into_date_time().unwrap();
|
||||
let start = e.start.timestamp();
|
||||
let end = e.end.timestamp();
|
||||
@@ -247,8 +245,9 @@ fn roundtrip_expansion(ics: &str, ignore_errors: bool) {
|
||||
if max > max_utc {
|
||||
max_utc = max;
|
||||
}
|
||||
CalendarEvent {
|
||||
CalendarEventExpansion {
|
||||
comp_id: e.comp_id,
|
||||
expansion_id: i as u32,
|
||||
start,
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ pub async fn test(test: &WebDavTest) {
|
||||
.fetch_dav_resources(
|
||||
&access_token,
|
||||
client.account_id,
|
||||
SyncCollection::CalendarScheduling,
|
||||
SyncCollection::CalendarEventNotification,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
use super::{DavResponse, DummyWebDavClient, WebDavTest};
|
||||
use crate::webdav::{GenerateTestDavResource, TEST_ICAL_2, TEST_VTIMEZONE_1};
|
||||
use ahash::{AHashMap, AHashSet};
|
||||
use dav_proto::schema::{
|
||||
property::{CalDavProperty, CardDavProperty, DavProperty, PrincipalProperty, WebDavProperty},
|
||||
request::DeadElementTag,
|
||||
use dav_proto::schema::property::{
|
||||
CalDavProperty, CardDavProperty, DavProperty, PrincipalProperty, WebDavProperty,
|
||||
};
|
||||
use groupware::DavResourceName;
|
||||
use hyper::StatusCode;
|
||||
use types::dead_property::DeadElementTag;
|
||||
|
||||
pub async fn test(test: &WebDavTest, assisted_discovery: bool) {
|
||||
let client = test.client("jane");
|
||||
|
||||
Reference in New Issue
Block a user