mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-06-07 07:32:35 +00:00
35 lines
798 B
Rust
35 lines
798 B
Rust
mod common;
|
|
use common::*;
|
|
use reqwest::StatusCode;
|
|
|
|
#[tokio::test]
|
|
async fn test_get_repo() {
|
|
let client = client();
|
|
let params = [
|
|
("did", AUTH_DID),
|
|
];
|
|
let res = client.get(format!("{}/xrpc/com.atproto.sync.getRepo", BASE_URL))
|
|
.query(¶ms)
|
|
.send()
|
|
.await
|
|
.expect("Failed to send request");
|
|
|
|
assert_eq!(res.status(), StatusCode::OK);
|
|
}
|
|
|
|
#[tokio::test]
|
|
async fn test_get_blocks() {
|
|
let client = client();
|
|
let params = [
|
|
("did", AUTH_DID),
|
|
// "cids" would be a list of CIDs
|
|
];
|
|
let res = client.get(format!("{}/xrpc/com.atproto.sync.getBlocks", BASE_URL))
|
|
.query(¶ms)
|
|
.send()
|
|
.await
|
|
.expect("Failed to send request");
|
|
|
|
assert_eq!(res.status(), StatusCode::OK);
|
|
}
|