mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-29 07:41:20 +00:00
Update post_view.rs
This commit is contained in:
parent
ef654b1472
commit
49ca4da763
1 changed files with 3 additions and 4 deletions
|
@ -1446,7 +1446,7 @@ mod tests {
|
||||||
let inserted_community = Community::create(pool, &community_form).await.unwrap();
|
let inserted_community = Community::create(pool, &community_form).await.unwrap();
|
||||||
|
|
||||||
let mut inserted_post_ids = vec![];
|
let mut inserted_post_ids = vec![];
|
||||||
let mut comment_forms = vec![];
|
let mut inserted_comment_ids = vec![];
|
||||||
|
|
||||||
// Create 150 posts with varying non-correlating values for publish date, number of comments, and featured
|
// Create 150 posts with varying non-correlating values for publish date, number of comments, and featured
|
||||||
for comments in 0..10 {
|
for comments in 0..10 {
|
||||||
|
@ -1468,13 +1468,12 @@ mod tests {
|
||||||
.post_id(inserted_post.id)
|
.post_id(inserted_post.id)
|
||||||
.content("yes".to_owned())
|
.content("yes".to_owned())
|
||||||
.build();
|
.build();
|
||||||
comment_forms.push((comment_form, None));
|
let inserted_comment = Comment::create(pool, &comment_form, None).await.unwrap();
|
||||||
|
inserted_comment_ids.push(inserted_comment.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Comment::create_batch(pool, &comment_forms).await.unwrap();
|
|
||||||
|
|
||||||
let mut listed_post_ids = vec![];
|
let mut listed_post_ids = vec![];
|
||||||
let mut page_after = None;
|
let mut page_after = None;
|
||||||
loop {
|
loop {
|
||||||
|
|
Loading…
Reference in a new issue