asdf/test/plugin_test_command.bats
Victor Hugo Borja 9cac0ac50a Faster exec times. Load commands only when nedded.
When testing, use `run asdf` to actually test the command
as the user would invoke it, so that we might catch possible
errors on `bin/asdf`.
2019-01-20 02:13:20 -06:00

24 lines
481 B
Bash

#!/usr/bin/env bats
load test_helpers
setup() {
setup_asdf_dir
}
teardown() {
clean_asdf_dir
}
@test "plugin_test_command with no URL specified prints an error" {
run asdf plugin-test "elixir"
[ "$status" -eq 1 ]
[ "$output" = "FAILED: please provide a plugin name and url" ]
}
@test "plugin_test_command with no name or URL specified prints an error" {
run asdf plugin-test
[ "$status" -eq 1 ]
[ "$output" = "FAILED: please provide a plugin name and url" ]
}