diff options
| author | Zeyla Hellyer <[email protected]> | 2017-12-17 21:45:25 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-12-17 21:46:30 -0800 |
| commit | 2abeea53745b5ddfce33d9e1160c682888850344 (patch) | |
| tree | 81b535e64c25b27d5819f5c24caf6442101bce8d /tests/test_deser.rs | |
| parent | Default serde on a couple Ready structfields (diff) | |
| download | serenity-2abeea53745b5ddfce33d9e1160c682888850344.tar.xz serenity-2abeea53745b5ddfce33d9e1160c682888850344.zip | |
Fix `Guild` deser without `system_channel_id`
Fix the deserialization of `model::guild::Guild` when
`Guild::system_channel_id` is not present.
Additionally, add a test case for this.
Diffstat (limited to 'tests/test_deser.rs')
| -rw-r--r-- | tests/test_deser.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_deser.rs b/tests/test_deser.rs index b17fe3c..ae9536b 100644 --- a/tests/test_deser.rs +++ b/tests/test_deser.rs @@ -178,3 +178,10 @@ fn message_type_7() { fn guild_features_deser() { p!(GuildCreateEvent, "guild_create_features"); } + +// Ensure that `Guild`s still deserialize despite the `system_channel_id` key +// missing. +#[test] +fn guild_system_channel_id_missing() { + p!(Guild, "guild_system_channel_id_missing"); +} |