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/recipies/mod.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 crates/rocie-server/tests/recipies/mod.rs (limited to 'crates/rocie-server/tests/recipies/mod.rs') 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()); +} -- cgit 1.4.1