diff options
| author | Zeyla Hellyer <[email protected]> | 2018-07-02 09:44:32 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-07-02 09:44:32 -0700 |
| commit | bd4aa0aabda4a2986e6145e3a793e8b2a391f8dd (patch) | |
| tree | 1a4b2901a5c37ae3dac8f5e586d3fec0260ce622 /tests | |
| parent | Fix utils::is_nsfw string slicing (diff) | |
| download | serenity-bd4aa0aabda4a2986e6145e3a793e8b2a391f8dd.tar.xz serenity-bd4aa0aabda4a2986e6145e3a793e8b2a391f8dd.zip | |
Fix 'nsfw-' case in utils::is_nsfw
In the utils::is_nsfw function, an input of 'nsfw-' shouldn't return true.
Discord's (previous) NSFW detection classified 'nsfw' and anything starting with
'nsfw-' - but not including - as NSFW.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_utils.rs b/tests/test_utils.rs index 99308e4..d2d1783 100644 --- a/tests/test_utils.rs +++ b/tests/test_utils.rs @@ -9,6 +9,6 @@ fn test_is_nsfw() { assert!(!is_nsfw("general"));
assert!(is_nsfw("nsfw"));
assert!(is_nsfw("nsfw-test"));
- assert!(is_nsfw("nsfw-"));
+ assert!(!is_nsfw("nsfw-"));
assert!(!is_nsfw("général"));
}
\ No newline at end of file |