Nit: capitalize static variable identifiers
This commit is contained in:
parent
382b1fd0e2
commit
68ddadac78
|
@ -60,7 +60,7 @@ pub fn deserialize_user_account_str(serialized_user_account_without_token: &str,
|
|||
mod test {
|
||||
use crate::mastodon::accounts::{UserAccount, verify_credentials};
|
||||
|
||||
static pleroma_json_fixture: &'static str = r#"
|
||||
static PLEROMA_JSON_FIXTURE: &'static str = r#"
|
||||
{
|
||||
"acct": "Ninjatrappeur",
|
||||
"avatar": "https://social.alternativebit.fr/media/3f9ad2d6f473c954506f404de5a3636905035f32ec9f1f07deca0a72e88ac3e8.blob",
|
||||
|
@ -148,7 +148,7 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn test_parse_pleroma_user () {
|
||||
let got: UserAccount = serde_json::from_str(&pleroma_json_fixture).unwrap();
|
||||
let got: UserAccount = serde_json::from_str(&PLEROMA_JSON_FIXTURE).unwrap();
|
||||
assert_eq!(got, expected_account());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ pub fn generate_token(app: &RegisteredAppWithInstanceFqdn, auth_code: &str) -> R
|
|||
mod test {
|
||||
use crate::mastodon::oauth::{RegisteredApp, AuthToken, register_app, generate_token};
|
||||
|
||||
static pleroma_register_app_json_fixture: &'static str = r#"
|
||||
static PLEROMA_REGISTER_APP_JSON_FIXTURE: &'static str = r#"
|
||||
{
|
||||
"client_id": "yUy22iiE1Ql1RYw3GFSX-pCyp4zn4pt3f5KVO4l8O3c",
|
||||
"client_secret": "NT_ypYpC25xhPKQYIzgBzoEpqRRBTwQHUyYYzJbz2BE",
|
||||
|
@ -90,7 +90,7 @@ mod test {
|
|||
"website": null
|
||||
}"#;
|
||||
|
||||
static pleroma_generate_token_json_fixture: &'static str = r#"
|
||||
static PLEROMA_GENERATE_TOKEN_JSON_FIXTURE: &'static str = r#"
|
||||
{
|
||||
"access_token": "8YA7xlkn9auNTeCZl9Z7lvfnDOEZu4VcatT1p1plqms",
|
||||
"created_at": 1656412658,
|
||||
|
@ -127,13 +127,13 @@ mod test {
|
|||
|
||||
#[test]
|
||||
fn test_parse_pleroma_app () {
|
||||
let got: RegisteredApp = serde_json::from_str(&pleroma_register_app_json_fixture).unwrap();
|
||||
let got: RegisteredApp = serde_json::from_str(&PLEROMA_REGISTER_APP_JSON_FIXTURE).unwrap();
|
||||
assert_eq!(got, expected_app());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_pleroma_token () {
|
||||
let got: AuthToken = serde_json::from_str(&pleroma_generate_token_json_fixture).unwrap();
|
||||
let got: AuthToken = serde_json::from_str(&PLEROMA_GENERATE_TOKEN_JSON_FIXTURE).unwrap();
|
||||
assert_eq!(got, expected_token());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue