aboutsummaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
authorMishio595 <[email protected]>2018-08-01 15:38:12 -0600
committerMishio595 <[email protected]>2018-08-01 15:38:12 -0600
commitc5fb7b4b331ef5a66179539b065913078e55b668 (patch)
tree99bc28270eaad9acf3da3871e72ba67dac5b87eb /src/http
parentMerge branch 'asref_messageid_for_message' (diff)
parentDon't delay Ready with cache enabled (diff)
downloadserenity-c5fb7b4b331ef5a66179539b065913078e55b668.tar.xz
serenity-c5fb7b4b331ef5a66179539b065913078e55b668.zip
Merge branch 'upstream'
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,
+ });
+ }
+}