mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 01:12:24 +00:00
store: Fix test_calendar
This commit is contained in:
@@ -29,3 +29,5 @@ rustical_xml.workspace = true
|
||||
[dev-dependencies]
|
||||
rstest = { workspace = true }
|
||||
rstest_reuse = { workspace = true }
|
||||
rustical_store_sqlite.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user