summaryrefslogtreecommitdiff
path: root/test/uid_zero_test.bats
blob: f1f1dcbed6a3fa6b42094c1418efb2322d7b7715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bats

load test_helper

@test "it finds the user with uid 0" {
  run ./bin/uid-zero test/fixtures/passwd_with_uid_zero

  assert_success $'root:0'
}

@test "it does not find a user with uid 0" {
  run ./bin/uid-zero test/fixtures/passwd_without_uid_zero

  assert_failure $''
}