diff options
| author | Austin Hellyer <[email protected]> | 2016-12-28 11:11:46 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-12-28 11:11:46 -0800 |
| commit | ab778f8a9cf47c4e27fe688a61effb0caa4f8a6e (patch) | |
| tree | c19e5a5ca6e65a22d124c76031340fb6643931f3 /tests | |
| parent | Accept u64 shard counts (diff) | |
| download | serenity-ab778f8a9cf47c4e27fe688a61effb0caa4f8a6e.tar.xz serenity-ab778f8a9cf47c4e27fe688a61effb0caa4f8a6e.zip | |
Support webp/gif avatars
If the avatar hash begins with "a_", then the avatar is animated and is
a GIF. Otherwise, use WEBP.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_user.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_user.rs b/tests/test_user.rs index b4509f3..3da1ec6 100644 --- a/tests/test_user.rs +++ b/tests/test_user.rs @@ -16,9 +16,11 @@ fn gen() -> User { fn test_core() { let mut user = gen(); - assert!(user.avatar_url().unwrap().ends_with("/avatars/210/abc.jpg")); + assert!(user.avatar_url().unwrap().ends_with("/avatars/210/abc.webp?size=1024")); - user.avatar = None; + user.avatar = Some("a_aaa".to_owned()); + assert!(user.avatar_url().unwrap().ends_with("/avatars/210/a_aaa.gif?size=1024")); + user.avatar = None; assert!(user.avatar_url().is_none()); } |