this repo has no description
1mod common;
2use common::*;
3use reqwest::StatusCode;
4
5#[tokio::test]
6async fn test_get_follows() {
7 let client = client();
8 let params = [
9 ("actor", AUTH_DID),
10 ];
11 let res = client.get(format!("{}/xrpc/app.bsky.graph.getFollows", base_url().await))
12 .query(¶ms)
13 .bearer_auth(AUTH_TOKEN)
14 .send()
15 .await
16 .expect("Failed to send request");
17
18 assert_eq!(res.status(), StatusCode::OK);
19}
20
21#[tokio::test]
22async fn test_get_followers() {
23 let client = client();
24 let params = [
25 ("actor", AUTH_DID),
26 ];
27 let res = client.get(format!("{}/xrpc/app.bsky.graph.getFollowers", base_url().await))
28 .query(¶ms)
29 .bearer_auth(AUTH_TOKEN)
30 .send()
31 .await
32 .expect("Failed to send request");
33
34 assert_eq!(res.status(), StatusCode::OK);
35}
36
37#[tokio::test]
38async fn test_get_mutes() {
39 let client = client();
40 let params = [
41 ("limit", "25"),
42 ];
43 let res = client.get(format!("{}/xrpc/app.bsky.graph.getMutes", base_url().await))
44 .query(¶ms)
45 .bearer_auth(AUTH_TOKEN)
46 .send()
47 .await
48 .expect("Failed to send request");
49
50 assert_eq!(res.status(), StatusCode::OK);
51}
52
53#[tokio::test]
54// User blocks, ie. not repo blocks ya know
55async fn test_get_user_blocks() {
56 let client = client();
57 let params = [
58 ("limit", "25"),
59 ];
60 let res = client.get(format!("{}/xrpc/app.bsky.graph.getBlocks", base_url().await))
61 .query(¶ms)
62 .bearer_auth(AUTH_TOKEN)
63 .send()
64 .await
65 .expect("Failed to send request");
66
67 assert_eq!(res.status(), StatusCode::OK);
68}