This commit is contained in:
Mateusz Gruszczyński committed 2026-10-05 09:30:21 +02:00
1 parent 1dea7f55c8
commit c819f0a335
151 files changed
+7610 -4264

No files matched your search

+7 -2
View File
@@ -4,7 +4,10 @@ mod tests {
#[test]
fn embedded_defaults_are_valid() {
let config = Config::embedded().unwrap();
assert_eq!(config.repository_url, "https://git.linuxiarz.pl/gru/RustProxy");
assert_eq!(
config.repository_url,
"https://git.linuxiarz.pl/gru/RustProxy"
);
assert_eq!(
config.version_url,
"https://git.linuxiarz.pl/gru/RustProxy/raw/branch/master/Cargo.toml"
@@ -32,7 +35,9 @@ foo = { version = "100.0.0" }
let base =
Url::parse("https://updates.example.invalid/releases/current/Cargo.toml").unwrap();
assert_eq!(
redirect_target(&base, "../next/Cargo.toml").unwrap().as_str(),
redirect_target(&base, "../next/Cargo.toml")
.unwrap()
.as_str(),
"https://updates.example.invalid/releases/next/Cargo.toml"
);
assert!(redirect_target(&base, "ftp://updates.example.invalid/Cargo.toml").is_err());