test(server): assert default_language/default_timezone config defaults

This commit is contained in:
2026-06-05 14:55:37 +02:00
parent 2460a1368d
commit 825b23adec
+5 -1
View File
@@ -1,11 +1,13 @@
use clap::Parser; use clap::Parser;
use server::Config; use server::Config;
const CLEARED: [(&str, Option<&str>); 4] = [ const CLEARED: [(&str, Option<&str>); 6] = [
("DATABASE_URL", None), ("DATABASE_URL", None),
("BIND_ADDR", None), ("BIND_ADDR", None),
("APP_NAME", None), ("APP_NAME", None),
("SESSION_COOKIE_SECURE", None), ("SESSION_COOKIE_SECURE", None),
("DEFAULT_LANGUAGE", None),
("DEFAULT_TIMEZONE", None),
]; ];
#[test] #[test]
@@ -17,6 +19,8 @@ fn parses_from_args_with_defaults() {
assert_eq!(cfg.database_url, "postgres://localhost/test"); assert_eq!(cfg.database_url, "postgres://localhost/test");
assert_eq!(cfg.bind_addr, "0.0.0.0:8080"); assert_eq!(cfg.bind_addr, "0.0.0.0:8080");
assert_eq!(cfg.app_name, "Collection Management System"); assert_eq!(cfg.app_name, "Collection Management System");
assert_eq!(cfg.default_language, "sv");
assert_eq!(cfg.default_timezone, "Europe/Stockholm");
}); });
} }