aboutsummaryrefslogtreecommitdiffstats
path: root/crates/rocie-server/tests/products
diff options
context:
space:
mode:
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);
}