Added new field on Entity struct that has the ID on it
Co-authored-by: Smittyvb <me@smitop.com>
This commit is contained in:
parent
5a27fbb387
commit
e9cd90efff
2 changed files with 43 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue