Skip to content

Commit c7fbe02

Browse files
Craigspazccojocar
authored andcommitted
added some test cases
1 parent 351fb21 commit c7fbe02

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

test/git-secrets.bats

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,24 @@ load test_helper
377377
repo_run git-secrets --scan
378378
[ $status -eq 1 ]
379379
}
380+
381+
@test "-d can only be used with --remove" {
382+
repo_run git-secrets --list -d
383+
[ $status -eq 1 ]
384+
}
385+
386+
@test "-u can only be used with --remove" {
387+
repo_run git-secrets --list -u
388+
[ $status -eq 1 ]
389+
}
390+
391+
@test "--remove removes added items" {
392+
repo_run git-secrets --add "test"
393+
[ $status -eq 0 ]
394+
repo_run git-secrets --list
395+
[ $status -eq 0 ]
396+
repo_run git-secrets --remove "test"
397+
[ $status -eq 0 ]
398+
repo_run git-secrets --list
399+
[ $status -eq 0 ]
400+
}

0 commit comments

Comments
 (0)