blob: e8aa3c26f40555460a0b1573ba21900918a35c61 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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());
}
|