aboutsummaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
Diffstat (limited to 'src/http')
-rw-r--r--src/http/mod.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs
index 71c57c6..c50679a 100644
--- a/src/http/mod.rs
+++ b/src/http/mod.rs
@@ -2008,3 +2008,21 @@ pub enum GuildPagination {
/// The Id to get the guilds before.
Before(GuildId),
}
+
+#[cfg(test)]
+mod test {
+ use super::AttachmentType;
+ use std::path::Path;
+
+ #[test]
+ fn test_attachment_type() {
+ assert!(match AttachmentType::from(Path::new("./dogs/corgis/kona.png")) {
+ AttachmentType::Path(_) => true,
+ _ => false,
+ });
+ assert!(match AttachmentType::from("./cats/copycat.png") {
+ AttachmentType::Path(_) => true,
+ _ => false,
+ });
+ }
+}