mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-20 17:11:19 +02:00
feat: add multi-account ability
This commit is contained in:
@@ -10,20 +10,43 @@ fn test_parse_good_toml() {
|
||||
);
|
||||
assert_eq!(parse_good_toml.scootaloo.cache_path, "/tmp/scootaloo");
|
||||
|
||||
assert_eq!(parse_good_toml.twitter.username, "tamerelol");
|
||||
assert_eq!(parse_good_toml.twitter.consumer_key, "rand consumer key");
|
||||
assert_eq!(parse_good_toml.twitter.consumer_secret, "secret");
|
||||
assert_eq!(parse_good_toml.twitter.access_key, "rand access key");
|
||||
assert_eq!(parse_good_toml.twitter.access_secret, "super secret");
|
||||
|
||||
assert_eq!(parse_good_toml.mastodon.base, "https://m.nintendojo.fr");
|
||||
assert_eq!(parse_good_toml.mastodon.client_id, "rand client id");
|
||||
assert_eq!(parse_good_toml.mastodon.client_secret, "secret");
|
||||
assert_eq!(
|
||||
parse_good_toml.mastodon.redirect,
|
||||
&parse_good_toml
|
||||
.mastodon
|
||||
.get("tamerelol")
|
||||
.unwrap()
|
||||
.twitter_screen_name,
|
||||
"tamerelol"
|
||||
);
|
||||
assert_eq!(
|
||||
&parse_good_toml.mastodon.get("tamerelol").unwrap().base,
|
||||
"https://m.nintendojo.fr"
|
||||
);
|
||||
assert_eq!(
|
||||
&parse_good_toml.mastodon.get("tamerelol").unwrap().client_id,
|
||||
"rand client id"
|
||||
);
|
||||
assert_eq!(
|
||||
&parse_good_toml
|
||||
.mastodon
|
||||
.get("tamerelol")
|
||||
.unwrap()
|
||||
.client_secret,
|
||||
"secret"
|
||||
);
|
||||
assert_eq!(
|
||||
&parse_good_toml.mastodon.get("tamerelol").unwrap().redirect,
|
||||
"urn:ietf:wg:oauth:2.0:oob"
|
||||
);
|
||||
assert_eq!(parse_good_toml.mastodon.token, "super secret");
|
||||
assert_eq!(
|
||||
&parse_good_toml.mastodon.get("tamerelol").unwrap().token,
|
||||
"super secret"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user