about summary refs log tree commit diff stats
path: root/crates/rocie-server/tests/recipies
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/recipies
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/recipies')
-rw-r--r--crates/rocie-server/tests/recipies/mod.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/rocie-server/tests/recipies/mod.rs b/crates/rocie-server/tests/recipies/mod.rs
new file mode 100644
index 0000000..e8aa3c2
--- /dev/null
+++ b/crates/rocie-server/tests/recipies/mod.rs
@@ -0,0 +1,24 @@
+use rocie_client::{
+    apis::{api_get_recipe_api::recipe_by_id, api_set_recipe_api::add_recipe},
+    models::RecipeStub,
+};
+
+use crate::testenv::{TestEnv, init::function_name, log::request};
+
+#[tokio::test]
+async fn test_recipe_roundtrip() {
+    let env = TestEnv::new(function_name!());
+
+    let recipe_id = request!(
+        env,
+        add_recipe(RecipeStub {
+            path: "/asia/curry".to_owned(),
+            content: "just make the curry".to_owned(),
+        })
+    );
+
+    let output = request!(env, recipe_by_id(recipe_id));
+
+    assert_eq!(output.path, "/asia/curry".to_owned());
+    assert_eq!(output.content, "just make the curry".to_owned());
+}