feat(sounds): mute and unmute subcommands

This commit is contained in:
Lewis Wynne 2026-04-02 00:42:12 +01:00
parent 08665bc835
commit 76768e4075
2 changed files with 57 additions and 0 deletions

View file

@ -304,3 +304,26 @@ SCRIPT
[[ "${output}" =~ "Usage:" ]]
[[ "${output}" =~ "check" ]]
}
# mute/unmute #################################################################
@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" ]]
}