tighten backend regression coverage
Add targeted tests for rejection paths, settlement overrides, and key analytics flows, and align localization/research docs with the shipped contract.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use serde_json as json;
|
||||
|
||||
#[test]
|
||||
fn english_and_swedish_localization_bundles_share_the_same_keys() {
|
||||
let en: json::Value =
|
||||
json::from_str(include_str!("../../contracts/localization/en.json")).unwrap();
|
||||
let sv: json::Value =
|
||||
json::from_str(include_str!("../../contracts/localization/sv.json")).unwrap();
|
||||
|
||||
let en_keys: BTreeSet<_> = en.as_object().unwrap().keys().cloned().collect();
|
||||
let sv_keys: BTreeSet<_> = sv.as_object().unwrap().keys().cloned().collect();
|
||||
|
||||
assert_eq!(en_keys, sv_keys);
|
||||
assert!(!en_keys.is_empty());
|
||||
|
||||
for key in &en_keys {
|
||||
assert!(
|
||||
!en[key].as_str().unwrap().trim().is_empty(),
|
||||
"missing English text for {key}"
|
||||
);
|
||||
assert!(
|
||||
!sv[key].as_str().unwrap().trim().is_empty(),
|
||||
"missing Swedish text for {key}"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user