From a62ab5c6dacaddb67931d7ac160bc7faaa707737 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 28 Nov 2025 16:30:02 +0100 Subject: feat(crates/rocie-server): Get closer to feature parity between rocie and grocy --- crates/rocie-server/tests/products/mod.rs | 4 ++-- crates/rocie-server/tests/products/register.rs | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'crates/rocie-server/tests/products') diff --git a/crates/rocie-server/tests/products/mod.rs b/crates/rocie-server/tests/products/mod.rs index 886e5b7..ee139f0 100644 --- a/crates/rocie-server/tests/products/mod.rs +++ b/crates/rocie-server/tests/products/mod.rs @@ -20,7 +20,7 @@ async fn create_product(env: &TestEnv, unit_property: UnitPropertyId, name: &str request!( env, register_product(ProductStub { - description: Some(None), + description: None, name: name.to_owned(), parent: None, unit_property @@ -31,7 +31,7 @@ async fn create_unit(env: &TestEnv, name: &str, unit_property: UnitPropertyId) - request!( env, register_unit(UnitStub { - description: Some(None), + description: None, full_name_plural: name.to_owned(), full_name_singular: name.to_owned(), short_name: name.to_owned(), diff --git a/crates/rocie-server/tests/products/register.rs b/crates/rocie-server/tests/products/register.rs index 4284bd1..bae7bc7 100644 --- a/crates/rocie-server/tests/products/register.rs +++ b/crates/rocie-server/tests/products/register.rs @@ -18,7 +18,7 @@ async fn test_product_register_roundtrip() { let unit_property = request!( env, register_unit_property(UnitPropertyStub { - description: Some(Some("The total mass of a product".to_owned())), + description: Some("The total mass of a product".to_owned()), name: "Mass".to_owned() }) ); @@ -26,7 +26,7 @@ async fn test_product_register_roundtrip() { let id = request!( env, register_product(ProductStub { - description: Some(Some("A soy based alternative to milk".to_owned())), + description: Some("A soy based alternative to milk".to_owned()), name: "Soy drink".to_owned(), parent: None, unit_property, @@ -38,11 +38,8 @@ async fn test_product_register_roundtrip() { assert_eq!(&product.name, "Soy drink"); assert_eq!( product.description, - Some(Some("A soy based alternative to milk".to_owned())) + Some("A soy based alternative to milk".to_owned()) ); assert_eq!(product.id, id); - // assert_eq!( - // product.parent, - // None, - // ); + assert_eq!(product.parent, None); } -- cgit 1.4.1