Remove sudo prefix from command if detected

This commit is contained in:
Michael Aquilina 2019-08-26 12:25:43 +01:00
parent a77777987d
commit cbd4e2bcac
No known key found for this signature in database
GPG key ID: 636066730B056BD1
2 changed files with 14 additions and 0 deletions

View file

@ -51,3 +51,12 @@
assert $state equals 0
assert "$output" same_as "no"
}
@test 'is_auto_notify_ignored - AUTO_NOTIFY_WHITELIST allowed with sudo' {
AUTO_NOTIFY_WHITELIST="foobar"
run _is_auto_notify_ignored "sudo foobar baz"
assert $state equals 0
assert "$output" same_as "no"
}