summaryrefslogtreecommitdiffstats
path: root/tests/surfaces.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/surfaces.rs')
-rw-r--r--tests/surfaces.rs30
1 files changed, 13 insertions, 17 deletions
diff --git a/tests/surfaces.rs b/tests/surfaces.rs
index 87b860d..15e07c3 100644
--- a/tests/surfaces.rs
+++ b/tests/surfaces.rs
@@ -27,10 +27,7 @@ fn attention_lists_outdated_dependencies_from_the_recorded_world() {
let web = Web::attach(env, client);
web.publish("plain-make");
web.publish("dep-client");
- assert!(
- !web.get("/attention").body.contains("Outdated:"),
- "dep-client is fresh right after both were published"
- );
+ assert!(!web.get("/attention").body.contains("Outdated:"), "dep-client is fresh right after both were published");
plain.bump(&[("pkgver", "2.0")]);
web.publish("plain-make");
@@ -60,7 +57,10 @@ fn the_package_page_answers_dependencies_and_staleness() {
let other = web.get("/packages/plain-make");
assert!(other.body.contains("Needed by"), "no needed-by block");
assert!(other.body.contains("dep-client"), "the dependent is not listed");
- assert!(other.body.contains("aur.archlinux.org/cgit/aur.git/tree/?h=plain-make&id="), "no per-release cgit link");
+ assert!(
+ other.body.contains("aur.archlinux.org/cgit/aur.git/tree/?h=plain-make&id="),
+ "no per-release cgit link"
+ );
assert!(other.body.contains("serving 2.0"), "the summary does not say what is served");
}
@@ -80,10 +80,7 @@ fn a_manual_rebuild_reuses_the_approved_identity_without_a_new_approval() {
"a manual rebuild must not mint an approval"
);
- let queued = web
- .env
- .query_i64("SELECT count(*) FROM build WHERE kind='manual_rebuild'", &[])
- .unwrap();
+ let queued = web.env.query_i64("SELECT count(*) FROM build WHERE kind='manual_rebuild'", &[]).unwrap();
assert_eq!(queued, 1, "the rebuild was not queued");
let id: String = web
@@ -91,13 +88,9 @@ fn a_manual_rebuild_reuses_the_approved_identity_without_a_new_approval() {
.db
.read(|c| {
use rusqlite::OptionalExtension;
- c.query_row(
- "SELECT id FROM build WHERE kind='manual_rebuild'",
- [],
- |r| r.get::<_, String>(0),
- )
- .optional()
- .map_err(Into::into)
+ c.query_row("SELECT id FROM build WHERE kind='manual_rebuild'", [], |r| r.get::<_, String>(0))
+ .optional()
+ .map_err(Into::into)
})
.unwrap()
.unwrap();
@@ -150,7 +143,10 @@ fn pausing_a_subscription_stops_detection_and_resuming_starts_it_again() {
);
web.fx.bump(&[("pkgver", "3.0")]);
let report = aur_build::watch::detect::check_pkgbase(&web.env.cfg, &web.env.db, "plain-make").unwrap();
- assert!(matches!(report.outcome, aur_build::watch::detect::Outcome::Paused), "a paused subscription was still inspected");
+ assert!(
+ matches!(report.outcome, aur_build::watch::detect::Outcome::Paused),
+ "a paused subscription was still inspected"
+ );
assert_eq!(
candidates::pending_candidates(&web.env.db).unwrap().len(),
0,