about summary refs log tree commit diff stats
path: root/crates/rocie-server/tests/products
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-11-28 16:30:02 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-11-28 16:30:02 +0100
commita62ab5c6dacaddb67931d7ac160bc7faaa707737 (patch)
treea35fa3540fbb89f575ab1ea72f9b23ace399e01c /crates/rocie-server/tests/products
parentchore(crates/rocie-client): Re-generate (diff)
downloadserver-a62ab5c6dacaddb67931d7ac160bc7faaa707737.zip
feat(crates/rocie-server): Get closer to feature parity between rocie and grocy
Diffstat (limited to 'crates/rocie-server/tests/products')
-rw-r--r--crates/rocie-server/tests/products/mod.rs4
-rw-r--r--crates/rocie-server/tests/products/register.rs11
2 files changed, 6 insertions, 9 deletions
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);
 }