summaryrefslogtreecommitdiff
path: root/test/segments/context.spec
diff options
context:
space:
mode:
Diffstat (limited to 'test/segments/context.spec')
-rwxr-xr-xtest/segments/context.spec5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/segments/context.spec b/test/segments/context.spec
index b350caf7..2cef90dd 100755
--- a/test/segments/context.spec
+++ b/test/segments/context.spec
@@ -31,6 +31,9 @@ function testContextSegmentDoesNotGetRenderedWithDefaultUser() {
}
function testContextSegmentDoesGetRenderedWhenSshConnectionIsOpen() {
+ function sudo() {
+ return 0
+ }
local SSH_CLIENT="putty"
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context)
@@ -39,6 +42,8 @@ function testContextSegmentDoesGetRenderedWhenSshConnectionIsOpen() {
source powerlevel9k.zsh-theme
assertEquals "%K{black} %F{yellow}%n@%m %k%F{black}%f " "$(build_left_prompt)"
+
+ unfunction sudo
}
function testContextSegmentWithForeignUser() {