Skip to content

Commit

Permalink
Update releases.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kixiron authored and Joshua Nelson committed Jul 1, 2020
1 parent 74901e7 commit 7015cd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ mime_guess = "2"
dotenv = "0.15"
zstd = "0.5"
git2 = { version = "0.13.6", default-features = false }
<<<<<<< HEAD
once_cell = "1.2.0"
=======
path-slash = "0.1.2"
>>>>>>> ddcd932... Added tests for multiple pages, path_slash for Windows and Unix builds and a status to robots.txt
once_cell = "1.4.0"
path-slash = "0.1.3"

# Data serialization and deserialization
serde = { version = "1.0", features = ["derive"] }
Expand Down
18 changes: 1 addition & 17 deletions src/web/releases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ pub fn search_handler(req: &mut Request) -> IronResult<Response> {
OFFSET FLOOR(RANDOM() * 280) LIMIT 1",
&[]
));
let row = rows.into_iter().next().unwrap(); // TODO: Is this really infallible?
let row = rows.into_iter().next().unwrap();

let name: String = row.get("name");
let version: String = row.get("version");
Expand Down Expand Up @@ -1134,22 +1134,6 @@ mod tests {
})
}

#[test]
fn recent_queue() {
wrapper(|env| {
let web = env.frontend();
assert_success("/releases/queue", web)?;

env.db().fake_release().name("some_random_crate").create()?;
env.db()
.fake_release()
.name("some_random_crate_that_failed")
.build_result_successful(false)
.create()?;
assert_success("/releases/queue", web)
})
}

#[test]
fn release_feed() {
wrapper(|env| {
Expand Down

0 comments on commit 7015cd8

Please sign in to comment.