| 1 | pub const HOST: &str = "statics.teams.cdn.office.net"; |
| 2 | pub const ROOT: &str = "https://statics.teams.cdn.office.net"; |
| 3 | pub const SOUND_BASE_URL: &str = "https://statics.teams.cdn.office.net/evergreen-assets/audio/"; |
| 4 | pub const STICKER_BASE_URL: &str = |
| 5 | "https://statics.teams.cdn.office.net/evergreen-assets/stickerassets"; |
| 6 | pub const EMOTICON_BASE_URL: &str = "https://statics.teams.cdn.office.net/evergreen-assets/personal-expressions/v2/assets/emoticons"; |
| 7 | pub const BACKGROUND_CATALOG_URL: &str = |
| 8 | "https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/config.json?v=7"; |
| 9 | |
| 10 | #[cfg(test)] |
| 11 | mod tests { |
| 12 | use super::*; |
| 13 | |
| 14 | #[test] |
| 15 | fn every_url_lives_on_the_cdn_root() { |
| 16 | assert_eq!(ROOT, format!("https://{HOST}")); |
| 17 | for url in [ |
| 18 | SOUND_BASE_URL, |
| 19 | STICKER_BASE_URL, |
| 20 | EMOTICON_BASE_URL, |
| 21 | BACKGROUND_CATALOG_URL, |
| 22 | ] { |
| 23 | assert!( |
| 24 | url.starts_with(&format!("{ROOT}/evergreen-assets/")), |
| 25 | "{url}" |
| 26 | ); |
| 27 | } |
| 28 | } |
| 29 | } |