Skip to content

Commit

Permalink
try test
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Jul 3, 2024
1 parent 01e1cc2 commit 9d04b26
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions src/web/releases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,15 +806,21 @@ mod tests {
async_wrapper(|env| async move {
let db = env.async_db().await;

env.async_fake_release()
.await
.name("foo")
.version("0.1.0")
.create_async()
.await?;

let mut conn = db.async_conn().await;
let (release_id, _build_id) = fake_release_that_failed_before_build(
&mut conn,
"foo",
"0.1.0",
"0.2.0",
"some random error",
)
.await?;

// sqlx::query_scalar!(
// "UPDATE releases
// SET is_library = TRUE
Expand All @@ -824,6 +830,25 @@ mod tests {
// .execute(&mut *conn)
// .await?;

// let github_repo = FakeGithubStats {
// repo: "some_repo".into(),
// stars: 123,
// forks: 123,
// issues: 123,
// }
// .create(&mut *conn)
// .await?;

// sqlx::query_scalar!(
// "UPDATE releases
// SET repository_id = $2
// WHERE id = $1",
// release_id,
// github_repo,
// )
// .execute(&mut *conn)
// .await?;

let releases = get_releases(&mut *conn, 1, 10, Order::ReleaseTime, false).await?;

assert_eq!(
Expand Down

0 comments on commit 9d04b26

Please sign in to comment.