summaryrefslogtreecommitdiff
path: root/test/no-password_test.bats
blob: 815b25e467d1b572406d207fe144bf8eda33fd3f (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 a user without a password" {
  run ./bin/no-password test/fixtures/passwd_with_missing_password

  assert_success $'daemon::1:1:daemon:/tmp:/usr/bin/false'
}

@test "it does not find any users that are missing a password" {
  run ./bin/no-password test/fixtures/passwd_with_uid_zero

  assert_failure $''
}