summaryrefslogtreecommitdiff
path: root/test/duplicate-ids_test.bats
blob: 9bcb7a0016fb5d02de852211c65faabe1bfed9b7 (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 users with duplicate user ids" {
  run ./bin/duplicate-ids test/fixtures/passwd_with_duplicate_ids

  assert_failure $'1 bin\n1 daemon\n6 shutdown\n6 halt'
}

@test "it does not find any duplicate user ids" {
  run ./bin/duplicate-ids test/fixtures/passwd

  assert_success
}