diff options
| author | mo khan <mo.khan@gmail.com> | 2019-10-12 14:43:26 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-10-12 14:43:26 -0600 |
| commit | d5beeffb6247a8b0e115d059491255600dd70440 (patch) | |
| tree | d16d5098da5bceac5df20aac99a15a5594693145 /test/uid_zero_test.bats | |
| parent | f87ad6a485a005890ae24b82caa643ef90c430e8 (diff) | |
Add test for passwd file without uid 0
Diffstat (limited to 'test/uid_zero_test.bats')
| -rw-r--r-- | test/uid_zero_test.bats | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/uid_zero_test.bats b/test/uid_zero_test.bats index 397312e..f1f1dcb 100644 --- a/test/uid_zero_test.bats +++ b/test/uid_zero_test.bats @@ -3,7 +3,13 @@ load test_helper @test "it finds the user with uid 0" { - run ./bin/uid-zero test/fixtures/passwd + 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 $'' +} |
