summaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: b3f80ed980d44f3d6c0cc71f2867c35de17b6a5a (plain)
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
pub mod emotes;

pub mod betterttv;

#[cfg(test)]
mod tests {
    use crate::{betterttv::BetterTTVAPIClient, emotes::RetrieveEmoteAPI};

    #[tokio::test]
    async fn get_betterttv_channel_emotes() {
        let bttv = BetterTTVAPIClient::new();
        let emotes = bttv.get_channel_emotes("555579413").await;

        assert_eq!(emotes.is_ok(), true);

        let emotes = emotes.unwrap();

        assert_eq!(emotes.len(), 1);
    }

    #[tokio::test]
    async fn get_betterttv_global_emotes() {
        let bttv = BetterTTVAPIClient::new();
        let emotes = bttv.get_global_emotes().await;

        assert_eq!(emotes.is_ok(), true);

        let emotes = emotes.unwrap();

        assert_eq!(emotes.len() >= 1, true);
    }
}