Add integration test for accept (int and string)

This commit is contained in:
Matthias 2024-01-10 00:10:22 +01:00
parent 1ab05efdcb
commit f933656161
2 changed files with 15 additions and 0 deletions

1
fixtures/configs/accept.toml vendored Normal file
View file

@ -0,0 +1 @@
accept = [200, "203", "301..=304", 404]

View file

@ -653,6 +653,20 @@ mod cli {
.success();
}
#[tokio::test]
async fn test_config_accept() {
let mock_server = mock_server!(StatusCode::OK);
let config = fixtures_path().join("configs").join("accept.toml");
let mut cmd = main_command();
cmd.arg("--config")
.arg(config)
.arg("-")
.write_stdin(mock_server.uri())
.env_clear()
.assert()
.success();
}
#[test]
fn test_lycheeignore_file() -> Result<()> {
let mut cmd = main_command();