Added new field on Entity struct that has the ID on it

Co-authored-by: Smittyvb <me@smitop.com>
This commit is contained in:
Dashiell Stander 2021-07-26 23:12:16 -07:00 committed by Smitty
parent 5a27fbb387
commit e9cd90efff
2 changed files with 43 additions and 2 deletions

View file

@ -10,7 +10,8 @@ fn simple_item() {
#[test]
fn douglas_adams() {
let j: serde_json::Value = serde_json::from_str(include_str!("../items/Q42.json")).unwrap();
Entity::from_json(j).unwrap();
let e = Entity::from_json(j).unwrap();
assert_eq!(e.id, WikiId::EntityId(Qid(42)));
}
#[test]