-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathchannels_url.rs
63 lines (55 loc) · 1.51 KB
/
channels_url.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use graph_rs_sdk::*;
static RID: &str = "T5Y6RODPNfYICbtYWrofwUGBJWnaJkNwH9x";
static ID: &str = "b!CbtYWrofwUGBJWnaJkNwoNrBLp_kC3RKklSXPwrdeP3yH8_qmH9xT5Y6RODPNfYI";
#[test]
fn teams_channel_request() {
let client = Graph::new("");
assert_eq!(
format!("/v1.0/teams/{RID}/channels"),
client.team(RID).channels().list_channels().url().path()
);
assert_eq!(
format!("/v1.0/teams/{RID}/channels/{ID}/tabs/{ID}"),
client.team(RID).channel(ID).get_tabs(ID).url().path()
);
assert_eq!(
format!("/v1.0/teams/{RID}/channels/{ID}/sharedWithTeams/{ID}"),
client
.team(RID)
.channel(ID)
.shared_with_team(ID)
.get_shared_with_teams()
.url()
.path()
);
assert_eq!(
format!("/v1.0/teams/{RID}/channels/{ID}/sharedWithTeams"),
client
.team(RID)
.channel(ID)
.shared_with_teams()
.list_shared_with_teams()
.url()
.path()
);
assert_eq!(
format!("/v1.0/teams/{RID}/channels/{ID}/messages"),
client
.team(RID)
.channel(ID)
.messages()
.list_messages()
.url()
.path()
);
assert_eq!(
format!("/v1.0/teams/{RID}/channels/{ID}/messages/{ID}"),
client
.team(RID)
.channel(ID)
.message(ID)
.get_messages()
.url()
.path()
);
}