Modify test data for Post

This commit is contained in:
Kitaiti Makoto 2022-05-01 12:59:48 +09:00
parent 8f976be998
commit 38ebc9ea41

View File

@ -1715,10 +1715,10 @@ mod tests {
"name": "Testing", "name": "Testing",
"published": format_datetime(&post.creation_date), "published": format_datetime(&post.creation_date),
"source": { "source": {
"content": "", "content": "Hello",
"mediaType": "text/markdown" "mediaType": "text/markdown"
}, },
"summary": "", "summary": "Bye",
"tag": [ "tag": [
{ {
"href": "https://plu.me/@/user/", "href": "https://plu.me/@/user/",
@ -1753,10 +1753,10 @@ mod tests {
"name": "Testing", "name": "Testing",
"published": format_datetime(&post.creation_date), "published": format_datetime(&post.creation_date),
"source": { "source": {
"content": "", "content": "Hello",
"mediaType": "text/markdown" "mediaType": "text/markdown"
}, },
"summary": "", "summary": "Bye",
"tag": [ "tag": [
{ {
"href": "https://plu.me/@/user/", "href": "https://plu.me/@/user/",
@ -1795,10 +1795,10 @@ mod tests {
"name": "Testing", "name": "Testing",
"published": format_datetime(&post.creation_date), "published": format_datetime(&post.creation_date),
"source": { "source": {
"content": "", "content": "Hello",
"mediaType": "text/markdown" "mediaType": "text/markdown"
}, },
"summary": "", "summary": "Bye",
"tag": [ "tag": [
{ {
"href": "https://plu.me/@/user/", "href": "https://plu.me/@/user/",
@ -1840,10 +1840,10 @@ mod tests {
"name": "Testing", "name": "Testing",
"published": format_datetime(&post.creation_date), "published": format_datetime(&post.creation_date),
"source": { "source": {
"content": "", "content": "Hello",
"mediaType": "text/markdown" "mediaType": "text/markdown"
}, },
"summary": "", "summary": "Bye",
"tag": [ "tag": [
{ {
"href": "https://plu.me/@/user/", "href": "https://plu.me/@/user/",
@ -1885,10 +1885,10 @@ mod tests {
"name": "Testing", "name": "Testing",
"published": format_datetime(&post.creation_date), "published": format_datetime(&post.creation_date),
"source": { "source": {
"content": "", "content": "Hello",
"mediaType": "text/markdown" "mediaType": "text/markdown"
}, },
"summary": "", "summary": "Bye",
"tag": [ "tag": [
{ {
"href": "https://plu.me/@/user/", "href": "https://plu.me/@/user/",
@ -1924,7 +1924,7 @@ mod tests {
if key == "id" { if key == "id" {
continue; continue;
} }
assert_eq!(value, expected.get(key).unwrap()); assert_json_eq!(value, expected.get(key).unwrap());
} }
Ok(()) Ok(())
@ -1951,10 +1951,10 @@ mod tests {
"name": "Testing", "name": "Testing",
"published": format_datetime(&post.creation_date), "published": format_datetime(&post.creation_date),
"source": { "source": {
"content": "", "content": "Hello",
"mediaType": "text/markdown" "mediaType": "text/markdown"
}, },
"summary": "", "summary": "Bye",
"tag": [ "tag": [
{ {
"href": "https://plu.me/@/user/", "href": "https://plu.me/@/user/",
@ -1990,7 +1990,7 @@ mod tests {
if key == "id" { if key == "id" {
continue; continue;
} }
assert_eq!(value, expected.get(key).unwrap()); assert_json_eq!(value, expected.get(key).unwrap());
} }
Ok(()) Ok(())