Update stocks.bats

This commit is contained in:
Navan Chauhan 2018-07-26 18:45:31 +05:30 committed by GitHub
parent 7af7e364ac
commit e77b04603f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -25,15 +25,14 @@ fi
}
@test "Get stock info by passing in ticker" {
run stocks AAPL
[ "$status" -eq 0 ]
[ "${lines[0]}" = "AAPL stock info" ]
result=$( echo $(stocks AAPL) | grep -Eo "AAPL stock info" )
[ "$result" = "AAPL stock info" ]
}
@test "Get stock info by passing in company" {
run stocks Tesla
[ "$status" -eq 0 ]
[ "${lines[0]}" = "TSLA stock info" ]
result=$( echo $(stocks Apple) | grep -Eo "AAPL stock info" )
[ "$result" = "AAPL stock info" ]
}
@test "Get the tools version with -v" {