chore(repo): prune dead code and duplicate abstractions (#3413)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-12 13:09:42 +02:00
1 parent c17091768c
commit c9fdf8fead
2937 files changed
+42233 -176793

No files matched your search

-50
View File
@@ -149,53 +149,3 @@ fn render_flash(flash: &crate::api::types::FlashMessage) -> Markup {
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use crate::config::ProxyConfig;
fn config() -> AdminConfig {
AdminConfig {
host: String::new(),
port: 3020,
secret_key_base: "test-secret".to_owned(),
base_path: String::new(),
api_endpoint: String::new(),
media_endpoint: String::new(),
static_cdn_endpoint: "https://static.example".to_owned(),
reports_bucket_origin: String::new(),
admin_endpoint: String::new(),
web_app_endpoint: String::new(),
oauth_client_id: String::new(),
oauth_client_secret: String::new(),
oauth_redirect_uri: String::new(),
build_version: "test".to_owned(),
self_hosted: true,
proxy: ProxyConfig {
trust_client_ip_header: false,
client_ip_header_name: String::new(),
},
}
}
#[test]
fn instance_branding_replaces_the_fluxer_name_and_favicons() {
let branding = PremiumBranding {
product_name: Some("Example".to_owned()),
favicon_url: Some("https://media.example/favicon.png".to_owned()),
..PremiumBranding::default()
};
let links = favicon_links(&config(), Some(&branding)).into_string();
assert!(links.contains("https://media.example/favicon.png"));
assert!(!links.contains("static.example"));
assert_eq!(product_name(Some(&branding)), "Example");
}
#[test]
fn missing_branding_keeps_the_fluxer_name_and_favicons() {
let links = favicon_links(&config(), Some(&PremiumBranding::default())).into_string();
assert!(links.contains("https://static.example/web/favicon.ico"));
assert_eq!(product_name(None), "Fluxer");
}
}