Comments
This commit is contained in:
parent
e4ec80e118
commit
c16c0987c8
1 changed files with 6 additions and 3 deletions
|
|
@ -428,7 +428,6 @@ async fn recipe_tags() -> Result<(), Box<dyn Error>> {
|
|||
let server = TestServer::new(app::make_service(state))?;
|
||||
let cookie = Cookie::new("auth_token", token);
|
||||
|
||||
// Act.
|
||||
// Tags list must be empty.
|
||||
let response = server
|
||||
.get("/ron-api/recipe/tags")
|
||||
|
|
@ -439,6 +438,7 @@ async fn recipe_tags() -> Result<(), Box<dyn Error>> {
|
|||
let tags: ron_api::Tags = ron::de::from_bytes(response.as_bytes()).unwrap();
|
||||
assert!(tags.tags.is_empty());
|
||||
|
||||
// Act.
|
||||
// Add some tags.
|
||||
let response = server
|
||||
.post("/ron-api/recipe/tags")
|
||||
|
|
@ -453,8 +453,9 @@ async fn recipe_tags() -> Result<(), Box<dyn Error>> {
|
|||
.into(),
|
||||
)
|
||||
.await;
|
||||
response.assert_status_ok();
|
||||
|
||||
// Assert.
|
||||
response.assert_status_ok();
|
||||
let response = server
|
||||
.get("/ron-api/recipe/tags")
|
||||
.add_cookie(cookie.clone())
|
||||
|
|
@ -466,6 +467,7 @@ async fn recipe_tags() -> Result<(), Box<dyn Error>> {
|
|||
assert!(tags.tags.contains(&"abc".to_string())); // Tags are in lower case.
|
||||
assert!(tags.tags.contains(&"xyz".to_string()));
|
||||
|
||||
// Act.
|
||||
// Remove some tags.
|
||||
let response = server
|
||||
.delete("/ron-api/recipe/tags")
|
||||
|
|
@ -480,8 +482,9 @@ async fn recipe_tags() -> Result<(), Box<dyn Error>> {
|
|||
.into(),
|
||||
)
|
||||
.await;
|
||||
response.assert_status_ok();
|
||||
|
||||
// Assert.
|
||||
response.assert_status_ok();
|
||||
let response = server
|
||||
.get("/ron-api/recipe/tags")
|
||||
.add_cookie(cookie.clone())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue