Add tests for enabling multiple plugins at the same time

pull/974/head
Nils Winkler 2017-06-06 07:38:19 +02:00
parent 1068e7916b
commit fc4ce80329
1 changed files with 15 additions and 0 deletions

View File

@ -53,6 +53,21 @@ function local_setup {
assert [ -L "$BASH_IT/plugins/enabled/250---node.plugin.bash" ] assert [ -L "$BASH_IT/plugins/enabled/250---node.plugin.bash" ]
} }
@test "bash-it: enable the node and nvm plugins through the bash-it function" {
run bash-it enable plugin "node" "nvm"
assert_line "0" 'node enabled with priority 250.'
assert_line "1" 'nvm enabled with priority 225.'
assert [ -L "$BASH_IT/plugins/enabled/250---node.plugin.bash" ]
assert [ -L "$BASH_IT/plugins/enabled/225---nvm.plugin.bash" ]
}
@test "bash-it: enable the foo-unkown and nvm plugins through the bash-it function" {
run bash-it enable plugin "foo-unknown" "nvm"
assert_line "0" 'sorry, foo-unknown does not appear to be an available plugin.'
assert_line "1" 'nvm enabled with priority 225.'
assert [ -L "$BASH_IT/plugins/enabled/225---nvm.plugin.bash" ]
}
@test "bash-it: enable the nvm plugin" { @test "bash-it: enable the nvm plugin" {
run _enable-plugin "nvm" run _enable-plugin "nvm"
assert_line "0" 'nvm enabled with priority 225.' assert_line "0" 'nvm enabled with priority 225.'