store: Fix test_calendar

This commit is contained in:
Lennart
2025-01-01 14:18:37 +01:00
parent 00d284b0fb
commit 11fa0f24c7
5 changed files with 34 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
use rstest::rstest;
use rstest_reuse::{self, apply, template};
use rustical_store::sqlite_store::create_test_store;
use rustical_store::{model::CalendarObject, CalendarStore};
use rustical_store::{CalendarObject, CalendarStore};
use rustical_store_sqlite::create_test_store;
const TIMEZONE: &str = include_str!("examples/timezone.ics");
const EVENT: &str = include_str!("examples/event.ics");
@@ -24,9 +24,9 @@ async fn test_init<CS: CalendarStore>(_store: CS) {
#[apply(cal_store)]
#[tokio::test]
async fn test_create_event<CS: CalendarStore>(mut store: CS) {
async fn test_create_event<CS: CalendarStore>(store: CS) {
store
.insert_calendar(rustical_store::model::Calendar {
.insert_calendar(rustical_store::Calendar {
id: "test".to_owned(),
displayname: Some("Test Calendar".to_owned()),
principal: "testuser".to_owned(),
@@ -38,7 +38,7 @@ async fn test_create_event<CS: CalendarStore>(mut store: CS) {
let object = CalendarObject::from_ics("asd".to_owned(), EVENT.to_owned()).unwrap();
store
.put_object("testuser".to_owned(), "test".to_owned(), object)
.put_object("testuser".to_owned(), "test".to_owned(), object, true)
.await
.unwrap();