diff options
| author | Mishio595 <[email protected]> | 2018-08-01 15:38:12 -0600 |
|---|---|---|
| committer | Mishio595 <[email protected]> | 2018-08-01 15:38:12 -0600 |
| commit | c5fb7b4b331ef5a66179539b065913078e55b668 (patch) | |
| tree | 99bc28270eaad9acf3da3871e72ba67dac5b87eb /src/http | |
| parent | Merge branch 'asref_messageid_for_message' (diff) | |
| parent | Don't delay Ready with cache enabled (diff) | |
| download | serenity-c5fb7b4b331ef5a66179539b065913078e55b668.tar.xz serenity-c5fb7b4b331ef5a66179539b065913078e55b668.zip | |
Merge branch 'upstream'
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/mod.rs | 18 |
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, + }); + } +} |