aboutsummaryrefslogtreecommitdiffstats
path: root/adenosine-pds/src
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@robocracy.org>2023-03-04 19:43:10 -0800
committerbryan newbold <bnewbold@robocracy.org>2023-03-04 19:43:10 -0800
commit8228a8e52653e80848728458acb258556112716b (patch)
tree00b804b66bc05abe8c05603a64d799ed3b9f914a /adenosine-pds/src
parent21ab7252e7b354d6b94a544037906405ad3a078d (diff)
downloadadenosine-8228a8e52653e80848728458acb258556112716b.tar.gz
adenosine-8228a8e52653e80848728458acb258556112716b.zip
pds: fixup testsv0.3.0
Diffstat (limited to 'adenosine-pds/src')
-rw-r--r--adenosine-pds/src/db_bsky.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/adenosine-pds/src/db_bsky.rs b/adenosine-pds/src/db_bsky.rs
index c51979e..b80ff4f 100644
--- a/adenosine-pds/src/db_bsky.rs
+++ b/adenosine-pds/src/db_bsky.rs
@@ -752,15 +752,19 @@ fn test_bsky_thread() {
let post = bsky_get_thread(&mut srv, &AtUri::from_str(&bob_post1_uri).unwrap(), None)
.unwrap()
.thread;
- assert_eq!(post.post.author.did, bob_did.to_string());
- assert_eq!(post.post.author.handle, "bob.test".to_string());
- assert_eq!(post.post.embed, None);
- assert_eq!(post.post.replyCount, 1);
- assert_eq!(post.post.repostCount, 0);
- assert_eq!(post.post.upvoteCount, 0);
+ let ppost = post.post.unwrap();
+ assert_eq!(ppost.author.did, bob_did.to_string());
+ assert_eq!(ppost.author.handle, "bob.test".to_string());
+ assert_eq!(ppost.embed, None);
+ assert_eq!(ppost.replyCount, 1);
+ assert_eq!(ppost.repostCount, 0);
+ assert_eq!(ppost.upvoteCount, 0);
assert_eq!(post.replies.as_ref().unwrap().len(), 1);
let post_replies = post.replies.unwrap();
- assert_eq!(post_replies[0].post.author.did, alice_did.to_string());
+ assert_eq!(
+ post_replies[0].post.as_ref().unwrap().author.did,
+ alice_did.to_string()
+ );
// TODO: root URI, etc
}