Fixed ioreg - no battery test case

pull/1080/head
Nils Winkler 2017-11-02 06:08:20 +01:00
parent 7ea1a58216
commit 5ab0cc5388
1 changed files with 5 additions and 2 deletions

View File

@ -289,10 +289,13 @@ function setup_ioreg {
@test 'plugins battery: battery-percentage with ioreg, no status' { @test 'plugins battery: battery-percentage with ioreg, no status' {
setup_command_exists "ioreg" setup_command_exists "ioreg"
setup_ioreg "" # Simulate that no battery is present
function ioreg {
printf ""
}
run battery_percentage run battery_percentage
assert_output "00" assert_output "-1"
} }
####################### #######################