2
0
Fork 0
mirror of https://github.com/alexanderepstein/Bash-Snippets synced 2018-11-08 02:59:35 +01:00
Bash-Snippets/tests/siteciphers.bats

40 lines
914 B
Text
Raw Normal View History

2017-07-15 19:23:50 +02:00
#!/bin/env bats
2017-07-15 18:34:14 +02:00
@test "Testing siteciphers tool" {
echo siteciphers
}
@test "Check for latest version of bash-snippets on update" {
2017-08-02 08:05:17 +02:00
if [[ "$(uname)" == "Linux" ]];then
2017-07-15 18:34:14 +02:00
run siteciphers update
[ "$status" -eq 0 ]
[ "$output" = "Bash-Snippets is already the latest version" ]
2017-08-02 08:05:17 +02:00
fi
2017-07-15 18:34:14 +02:00
}
@test "No arguments prints usage instructions" {
run siteciphers
[ "$status" -eq 1 ]
[ "${lines[0]}" = "Siteciphers" ]
}
@test "The -h option should print usage" {
run siteciphers -h
[ "$status" -eq 0 ]
[ "${lines[0]}" = "Siteciphers" ]
}
#@test "Running siteciphers on travis-ci" {
# run siteciphers travis-ci.org
# [ "$status" -eq 0 ]
# [ "${lines[0]}" = "ECDHE-RSA-AES256-GCM-SHA384 - NO (tlsv1 alert insufficient security)" ]
#}
2017-07-15 18:34:14 +02:00
@test "Get the tools version with -v" {
run siteciphers -v
[ "$status" -eq 0 ]
2017-07-15 19:23:50 +02:00
result=$( echo $(siteciphers -v) | grep -Eo "Version")
2017-07-15 18:34:14 +02:00
[ "$result" = "Version" ]
}