mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-20 17:11:19 +02:00
style: fmt & clippy processed
This commit is contained in:
@@ -4,7 +4,10 @@ use scootaloo::parse_toml;
|
||||
fn test_parse_good_toml() {
|
||||
let parse_good_toml = parse_toml("tests/good_test.toml");
|
||||
|
||||
assert_eq!(parse_good_toml.scootaloo.db_path, "/var/random/scootaloo.sqlite");
|
||||
assert_eq!(
|
||||
parse_good_toml.scootaloo.db_path,
|
||||
"/var/random/scootaloo.sqlite"
|
||||
);
|
||||
assert_eq!(parse_good_toml.scootaloo.cache_path, "/tmp/scootaloo");
|
||||
|
||||
assert_eq!(parse_good_toml.twitter.username, "tamerelol");
|
||||
@@ -16,18 +19,25 @@ fn test_parse_good_toml() {
|
||||
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, "urn:ietf:wg:oauth:2.0:oob");
|
||||
assert_eq!(
|
||||
parse_good_toml.mastodon.redirect,
|
||||
"urn:ietf:wg:oauth:2.0:oob"
|
||||
);
|
||||
assert_eq!(parse_good_toml.mastodon.token, "super secret");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = "Cannot open config file tests/no_file.toml: No such file or directory (os error 2)")]
|
||||
#[should_panic(
|
||||
expected = "Cannot open config file tests/no_file.toml: No such file or directory (os error 2)"
|
||||
)]
|
||||
fn test_parse_no_toml() {
|
||||
let _parse_no_toml = parse_toml("tests/no_file.toml");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = "Cannot parse TOML file tests/bad_test.toml: expected an equals, found a newline at line 1 column 5")]
|
||||
#[should_panic(
|
||||
expected = "Cannot parse TOML file tests/bad_test.toml: expected an equals, found a newline at line 1 column 5"
|
||||
)]
|
||||
fn test_parse_bad_toml() {
|
||||
let _parse_bad_toml = parse_toml("tests/bad_test.toml");
|
||||
}
|
||||
|
Reference in New Issue
Block a user