Skip to content

Commit

Permalink
chore: fix test code lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 committed Dec 3, 2024
1 parent 5405eb8 commit 562e2be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn test_category() -> Result<()> {

assert!(success);

let mut new_category_id: Vec<String> = Vec::new();
let mut new_category_ids: Vec<String> = Vec::new();

for i in 0..10 {
let response = client
Expand Down Expand Up @@ -67,7 +67,7 @@ async fn test_category() -> Result<()> {

assert!(success);
println!("Created category: {}", data.id);
new_category_id.push(data.id);
new_category_ids.push(data.id);
}

let response = client
Expand All @@ -93,9 +93,9 @@ async fn test_category() -> Result<()> {
assert!(success);
println!("Listed categories: {:#?}", data);

for i in 0..10 {
for new_category_id in new_category_ids.iter().take(10) {
let response = client
.post(format!("/category/delete/{}", new_category_id[i]))
.post(format!("/category/delete/{}", new_category_id))
.json(&CreateCategory {
id: &id,
token: &token,
Expand Down

0 comments on commit 562e2be

Please sign in to comment.