mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-22 10:51:29 +00:00
remove error
This commit is contained in:
parent
739dfd3ee2
commit
c9457b342d
1 changed files with 2 additions and 3 deletions
|
@ -113,7 +113,6 @@ pub enum LemmyErrorType {
|
||||||
SystemErrLogin,
|
SystemErrLogin,
|
||||||
CouldntSetAllRegistrationsAccepted,
|
CouldntSetAllRegistrationsAccepted,
|
||||||
CouldntSetAllEmailVerified,
|
CouldntSetAllEmailVerified,
|
||||||
Banned,
|
|
||||||
BlockedUrl,
|
BlockedUrl,
|
||||||
CouldntGetComments,
|
CouldntGetComments,
|
||||||
CouldntGetPosts,
|
CouldntGetPosts,
|
||||||
|
@ -328,9 +327,9 @@ cfg_if! {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn deserializes_no_message() -> LemmyResult<()> {
|
fn deserializes_no_message() -> LemmyResult<()> {
|
||||||
let err = LemmyError::from(LemmyErrorType::Banned).error_response();
|
let err = LemmyError::from(LemmyErrorType::BlockedUrl).error_response();
|
||||||
let json = String::from_utf8(err.into_body().try_into_bytes().unwrap_or_default().to_vec())?;
|
let json = String::from_utf8(err.into_body().try_into_bytes().unwrap_or_default().to_vec())?;
|
||||||
assert_eq!(&json, "{\"error\":\"banned\"}");
|
assert_eq!(&json, "{\"error\":\"blocked_url\"}");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue