diff options
| author | Austin Hellyer <[email protected]> | 2016-12-15 12:46:27 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-12-15 12:46:27 -0800 |
| commit | 0708ccf85bac347e59053133a2b8b6f2eabe99ba (patch) | |
| tree | 1deab8231d48b05495c08d34b0d7eace954a0a6a /tests/test_formatters.rs | |
| parent | Release v0.1.3 for some hotfixes (diff) | |
| download | serenity-0708ccf85bac347e59053133a2b8b6f2eabe99ba.tar.xz serenity-0708ccf85bac347e59053133a2b8b6f2eabe99ba.zip | |
Fix User::avatar_url + add Id display tests
User::avatar_url was formatting the user's Id as a mention, rather than
the inner u64.
Diffstat (limited to 'tests/test_formatters.rs')
| -rw-r--r-- | tests/test_formatters.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_formatters.rs b/tests/test_formatters.rs new file mode 100644 index 0000000..922fb41 --- /dev/null +++ b/tests/test_formatters.rs @@ -0,0 +1,12 @@ +extern crate serenity; + +use serenity::model::*; + +#[test] +fn test_formatters() { + assert_eq!(format!("{}", ChannelId(1)), "<#1>"); + assert_eq!(format!("{}", EmojiId(2)), "2"); + assert_eq!(format!("{}", GuildId(3)), "3"); + assert_eq!(format!("{}", RoleId(4)), "<@&4>"); + assert_eq!(format!("{}", UserId(5)), "<@5>"); +} |