-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Member methods due to variant joined_at values
Fix an issue where the library would check the Id of the guild that a member is in by checking the Member's ID and joined_at value with those of the members of guilds present in the cache. Performing this check would have the issue of where a joined_at for a member received over websocket would potentially have a varying value than that of the same member retrieved over REST. To fix this, attach the relevant guild's Id to the member on creation, where the Id is available. Fixes #68.
- Loading branch information
Zeyla Hellyer
committed
Mar 21, 2017
1 parent
6b0b9b2
commit cd914f5
Showing
8 changed files
with
90 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### Running the Ignored Test Suite | ||
|
||
Some tests are ignored by default, as they require authentication. These should | ||
only be run when you need to actually test something that _requires_ hitting | ||
Discord's REST API. | ||
|
||
### Generic Tests | ||
|
||
Provide the token by setting the environment variable `DISCORD_TOKEN`. | ||
|
||
e.g.: | ||
|
||
```sh | ||
$ DISCORD_TOKEN=aaaaaaaaaaa TEST_USER=285951325479632862 cargo test -- --ignored | ||
``` | ||
|
||
### Notes for Specific Tests | ||
|
||
issues/69: | ||
|
||
Provide a `TEST_USER` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
extern crate serenity; | ||
|
||
use serenity::ext::cache::Cache; | ||
use serenity::model::event::ChannelCreateEvent; | ||
use serenity::model::GuildId; | ||
|
||
#[ignore] | ||
fn test_private_channel_create() { | ||
let cache = Cache::default(); | ||
|
||
let event = ChannelCreateEvent { | ||
channel: Channel { | ||
|
||
} | ||
} | ||
} |