test: splits monolith into a bats file for each subcommand
This commit is contained in:
parent
b6fde582bb
commit
2a3c9f264f
10 changed files with 535 additions and 458 deletions
24
test/mute.bats
Normal file
24
test/mute.bats
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load test_helper
|
||||
|
||||
@test "mute creates muted file" {
|
||||
run_nag mute
|
||||
[ "${status}" -eq 0 ]
|
||||
[[ "${output}" =~ "muted" ]]
|
||||
[ -f "${NAG_DIR}/muted" ]
|
||||
}
|
||||
|
||||
@test "unmute removes muted file" {
|
||||
run_nag mute
|
||||
run_nag unmute
|
||||
[ "${status}" -eq 0 ]
|
||||
[[ "${output}" =~ "unmuted" ]]
|
||||
[ ! -f "${NAG_DIR}/muted" ]
|
||||
}
|
||||
|
||||
@test "unmute when not muted says so" {
|
||||
run_nag unmute
|
||||
[ "${status}" -eq 0 ]
|
||||
[[ "${output}" =~ "not muted" ]]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue