aboutsummaryrefslogtreecommitdiff
path: root/src/models/tests.rs
diff options
context:
space:
mode:
authorGravatar Jake Swenson <jake@jakeswenson.com> 2022-11-19 14:00:53 -0800
committerGravatar Jake Swenson <jake@jakeswenson.com> 2022-11-19 14:00:53 -0800
commit1e4f1d49919bf4dd0cfe1af1fcd95d1d90e4b7ff (patch)
treee9f8b9fe28fca2858ce1c1a54871c022b8374199 /src/models/tests.rs
parent52b5cb70ec6aaa058d306c9916bcb851f2311730 (diff)
downloadnotion-1e4f1d49919bf4dd0cfe1af1fcd95d1d90e4b7ff.tar.gz
notion-1e4f1d49919bf4dd0cfe1af1fcd95d1d90e4b7ff.tar.zst
notion-1e4f1d49919bf4dd0cfe1af1fcd95d1d90e4b7ff.zip
style(cargo fmt): Add rustfmt config, and fmt code
Diffstat (limited to '')
-rw-r--r--src/models/tests.rs56
1 files changed, 32 insertions, 24 deletions
diff --git a/src/models/tests.rs b/src/models/tests.rs
index 67e952d..1f41991 100644
--- a/src/models/tests.rs
+++ b/src/models/tests.rs
@@ -62,30 +62,38 @@ fn rich_text() {
fn rich_text_mention_user_person() {
let rich_text_mention_user_person: RichText =
serde_json::from_str(include_str!("tests/rich_text_mention_user_person.json")).unwrap();
- assert_eq!(rich_text_mention_user_person, RichText::Mention {
- rich_text: RichTextCommon {
- plain_text: "@John Doe".to_string(),
- href: None,
- annotations: Some(Annotations {
- bold: Some(false),
- code: Some(false),
- color: Some(TextColor::Default),
- italic: Some(false),
- strikethrough: Some(false),
- underline: Some(false),
- }),
- },
- mention: MentionObject::User {
- user: User::Person {
- common: UserCommon {
- id: UserId::from_str("1118608e-35e8-4fa3-aef7-a4ced85ce8e0").unwrap(),
- name: Some("John Doe".to_string()),
- avatar_url: Some("https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg".to_string()),
- },
- person: Person { email: "john.doe@gmail.com".to_string() },
- }
- },
- })
+ assert_eq!(
+ rich_text_mention_user_person,
+ RichText::Mention {
+ rich_text: RichTextCommon {
+ plain_text: "@John Doe".to_string(),
+ href: None,
+ annotations: Some(Annotations {
+ bold: Some(false),
+ code: Some(false),
+ color: Some(TextColor::Default),
+ italic: Some(false),
+ strikethrough: Some(false),
+ underline: Some(false),
+ }),
+ },
+ mention: MentionObject::User {
+ user: User::Person {
+ common: UserCommon {
+ id: UserId::from_str("1118608e-35e8-4fa3-aef7-a4ced85ce8e0").unwrap(),
+ name: Some("John Doe".to_string()),
+ avatar_url: Some(
+ "https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg"
+ .to_string()
+ ),
+ },
+ person: Person {
+ email: "john.doe@gmail.com".to_string()
+ },
+ }
+ },
+ }
+ )
}
#[test]