summaryrefslogtreecommitdiff
path: root/test/problem-7.bats
blob: 6b5e19372fac75cefcdc0748b7b2a19637fbd46f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bats

load test_helper

@test "invoke with a host on the network" {
  run problem-7.sh localhost

  assert_success "localhost is on the network"
}

@test "invoke with a host not on the network" {
  run problem-7.sh unknown

  assert_success "unknown is NOT on the network"
}

@test "invoke without a hostname argument" {
  run problem-7.sh

  assert_failure "error: a hostname is required"
}