Skip to content

Commit

Permalink
test: invalid domain
Browse files Browse the repository at this point in the history
Check for invalid domain such `example` instead of `example.com`
  • Loading branch information
azzamsa committed Feb 22, 2021
1 parent f792490 commit 2b39738
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ fn address_invalid() {
.stderr(predicate::str::contains("Invalid addres"));
}

#[test]
fn domain_invalid() {
let mut cmd = Command::cargo_bin("digs").unwrap();
cmd.arg("example")
.arg("-f")
.arg("tests/fixture/invalid-address.toml");
cmd.assert()
.failure()
.stderr(predicate::str::contains("Invalid domain name"));
}

#[test]
fn query() {
let mut cmd = Command::cargo_bin("digs").unwrap();
Expand Down

0 comments on commit 2b39738

Please sign in to comment.