mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-17 07:04:36 +00:00
real world language header test
This commit is contained in:
1 parent
2a5634503f
commit
9015efdf9e
1 file changed
+9
@@ -99,4 +99,13 @@ mod tests {
|
||||
|
||||
// TODO: Handle wildcard?
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vegito_browser() {
|
||||
// This is FakeYou user 'vegito's accept language
|
||||
let list = parse_accept_language("en-US,en;q=0.9,es;q=0.8");
|
||||
assert_eq!(list.get(0).unwrap().primary_language(), "en");
|
||||
assert_eq!(list.get(1).unwrap().primary_language(), "en");
|
||||
assert_eq!(list.get(2).unwrap().primary_language(), "es");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user