Skip to content

Commit

Permalink
test(core): add type to jsonify
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 12, 2021
1 parent bfc6290 commit ba15a29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quake_core/src/usecases/entrysets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ impl Entrysets {

element["id".to_string()] = entry_file.id.into();
element["content".to_string()] = entry_file.content.into();
element["type".to_string()] = define.entry_type.clone().into();

json.push(element)?;

Expand Down Expand Up @@ -354,7 +355,7 @@ mod tests {
let json = Entrysets::jsonify_with_format_date(&buf, &todo_define()).unwrap();

#[cfg(not(windows))]
assert_eq!(json, "[{\"title\":\"time support\",\"author\":\"\",\"content\":\"\\n\\nahaha\\n\",\"created_date\":1637781250,\"updated_date\":1637781250,\"id\":1}]");
assert_eq!(json, "[{\"title\":\"time support\",\"author\":\"\",\"content\":\"\\n\\nahaha\\n\",\"created_date\":1637781250,\"updated_date\":1637781250,\"id\":1,\"type\":\"todo\"}]");
}

#[ignore]
Expand Down

0 comments on commit ba15a29

Please sign in to comment.