blob: dfc898302c0e2104741b0c9389b7a3e7e94d4fb6 (
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_auth_recipe_api::recipe_by_id, api_set_auth_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!()).await;
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());
}
|