start with tests for base.plugin

This commit is contained in:
Ivan Povalyukhin
2015-03-29 16:31:05 -07:00
parent 10ea42dc75
commit 839cf4429a

19
test/plugins/base.plugin.bats Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bats
load ../test_helper
load ../../lib/composure
load ../../plugins/available/base.plugin
@test 'plugins base: ips()' {
declare -r localhost='127.0.0.1'
run ips
assert_success
assert_line $localhost
}
@test 'plugins base: myip()' {
run myip
assert_success
declare -r mask_ip=$(echo $output | tr -s '[0-9]' '?')
[[ $mask_ip == 'Your public IP is: ?.?.?.?' ]]
}