mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-17 05:00:26 +00:00
Add integration test for accept (int and string)
This commit is contained in:
parent
1ab05efdcb
commit
f933656161
2 changed files with 15 additions and 0 deletions
1
fixtures/configs/accept.toml
vendored
Normal file
1
fixtures/configs/accept.toml
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
accept = [200, "203", "301..=304", 404]
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue