add sda compat unit test for no web cookie
This commit is contained in:
parent
070be5b629
commit
d21ceef797
1 changed files with 34 additions and 0 deletions
|
@ -482,4 +482,38 @@ mod tests {
|
||||||
.account_name
|
.account_name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_sda_compatibility_no_webcookie() {
|
||||||
|
let path = Path::new("src/fixtures/maFiles/compat/no-webcookie/manifest.json");
|
||||||
|
assert!(path.is_file());
|
||||||
|
let result = Manifest::load(path);
|
||||||
|
assert!(matches!(result, Ok(_)));
|
||||||
|
let mut manifest = result.unwrap();
|
||||||
|
assert!(matches!(manifest.entries.last().unwrap().encryption, None));
|
||||||
|
assert!(matches!(manifest.load_accounts(&None), Ok(_)));
|
||||||
|
assert_eq!(
|
||||||
|
manifest.entries.last().unwrap().account_name,
|
||||||
|
manifest
|
||||||
|
.accounts
|
||||||
|
.last()
|
||||||
|
.unwrap()
|
||||||
|
.lock()
|
||||||
|
.unwrap()
|
||||||
|
.account_name
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
manifest
|
||||||
|
.accounts
|
||||||
|
.last()
|
||||||
|
.unwrap()
|
||||||
|
.lock()
|
||||||
|
.unwrap()
|
||||||
|
.session
|
||||||
|
.as_ref()
|
||||||
|
.unwrap()
|
||||||
|
.web_cookie,
|
||||||
|
None
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue