sqlite_store: Add some more basic tests

This commit is contained in:
Lennart
2025-11-05 23:17:59 +01:00
parent d843909084
commit 33d14a9ba0
9 changed files with 229 additions and 64 deletions

View File

@@ -2,7 +2,7 @@ use crate::synctoken::format_synctoken;
use chrono::NaiveDateTime;
use serde::Serialize;
#[derive(Debug, Clone, Serialize)]
#[derive(Debug, Clone, Serialize, PartialEq, Eq)]
pub struct Addressbook {
pub id: String,
pub principal: String,

View File

@@ -4,7 +4,7 @@ use rustical_ical::CalendarObjectType;
use serde::{Deserialize, Serialize};
use std::str::FromStr;
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct CalendarMetadata {
// Attributes that may be outsourced
pub displayname: Option<String>,
@@ -13,7 +13,7 @@ pub struct CalendarMetadata {
pub color: Option<String>,
}
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct Calendar {
// Attributes that may be outsourced
#[serde(flatten)]

View File

@@ -41,6 +41,11 @@ impl Error {
_ => StatusCode::INTERNAL_SERVER_ERROR,
}
}
#[must_use]
pub const fn is_not_found(&self) -> bool {
matches!(self, Self::NotFound)
}
}
impl IntoResponse for Error {